aboutsummaryrefslogtreecommitdiff
path: root/commitquery/reduce.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 13:38:19 +0000
committerGravatar Runxi Yu2026-03-29 13:39:49 +0000
commit37707aada0157f255dbad920b917efb601184e12 (patch)
tree29f79d242c764de8d6f1e65bcc847e53f21cd646 /commitquery/reduce.go
parentcommitquery: Context has been gone long ago (diff)
signatureNo signature
commitquery: Reorganize
Diffstat (limited to 'commitquery/reduce.go')
-rw-r--r--commitquery/reduce.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commitquery/reduce.go b/commitquery/reduce.go
index f8a86f69..46c3bf39 100644
--- a/commitquery/reduce.go
+++ b/commitquery/reduce.go
@@ -74,7 +74,7 @@ func removeRedundantNoGen(query *query, candidates []nodeIndex) ([]nodeIndex, er
func removeRedundantWithGen(query *query, candidates []nodeIndex) []nodeIndex {
sorted := append([]nodeIndex(nil), candidates...)
- slices.SortFunc(sorted, compareByGeneration(query))
+ slices.SortFunc(sorted, query.compareByGeneration())
minGeneration := query.effectiveGeneration(sorted[0])
minGenPos := 0
@@ -97,7 +97,7 @@ func removeRedundantWithGen(query *query, candidates []nodeIndex) []nodeIndex {
}
}
- slices.SortFunc(walkStart, compareByGeneration(query))
+ slices.SortFunc(walkStart, query.compareByGeneration())
for _, idx := range walkStart {
query.clearMarks(idx, markStale)