diff options
| author | 2026-03-26 09:20:51 +0000 | |
|---|---|---|
| committer | 2026-03-26 09:20:51 +0000 | |
| commit | 32c34501f5e7cfb6573824a82c8a5fa1be317ec8 (patch) | |
| tree | 45963d48bf53d10dd148aa076415d95ee32f7219 /commitquery/marks.go | |
| parent | *: Reorder imports (diff) | |
| signature | No signature | |
commitquery: Some file reorganizations v0.1.116
Diffstat (limited to 'commitquery/marks.go')
| -rw-r--r-- | commitquery/marks.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/commitquery/marks.go b/commitquery/marks.go index de008789..401acb15 100644 --- a/commitquery/marks.go +++ b/commitquery/marks.go @@ -69,3 +69,21 @@ func (query *Query) trackTouched(idx nodeIndex) { query.nodes[idx].touchedPhase = query.markPhase query.touched = append(query.touched, idx) } + +func (query *Query) collectMarkedResults() []nodeIndex { + out := make([]nodeIndex, 0, 4) + + for _, idx := range query.touched { + if !query.hasAnyMarks(idx, markResult) { + continue + } + + if query.hasAnyMarks(idx, markStale) { + continue + } + + out = append(out, idx) + } + + return out +} |
