From 37707aada0157f255dbad920b917efb601184e12 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 29 Mar 2026 13:38:19 +0000 Subject: commitquery: Reorganize --- commitquery/reduce.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commitquery/reduce.go') 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) -- cgit v1.3.1-10-gc9f91