aboutsummaryrefslogtreecommitdiff
path: root/commitquery/query_collect_marked_results.go
blob: 7139fb9be11ca1a2576893317392d4677f3ea8b1 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package commitquery

// collectMarkedResults returns touched nodes marked as non-stale results.
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
}