aboutsummaryrefslogtreecommitdiff
path: root/commitquery/marks.go
diff options
context:
space:
mode:
Diffstat (limited to 'commitquery/marks.go')
-rw-r--r--commitquery/marks.go18
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
+}