diff options
| author | 2026-03-28 17:40:02 +0000 | |
|---|---|---|
| committer | 2026-03-28 17:40:02 +0000 | |
| commit | 06583274fa64ad6677773bf4ca54f69226388203 (patch) | |
| tree | 66354bf972d267bf7ee5135eb7e5b90c31f9fe4d /commitquery/generation.go | |
| parent | format/commitgraph/read: Lifetime (diff) | |
| signature | No signature | |
commitquery: Make a reusable engine thingy
Diffstat (limited to 'commitquery/generation.go')
| -rw-r--r-- | commitquery/generation.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commitquery/generation.go b/commitquery/generation.go index 39ddd2e9..935da104 100644 --- a/commitquery/generation.go +++ b/commitquery/generation.go @@ -7,7 +7,7 @@ import ( ) // EffectiveGeneration returns one node's generation value. -func (query *Query) effectiveGeneration(idx nodeIndex) uint64 { +func (query *query) effectiveGeneration(idx nodeIndex) uint64 { if !query.nodes[idx].hasGeneration { return generationInfinity } @@ -19,7 +19,7 @@ const ( generationInfinity = uint64(math.MaxUint64) ) -func compareByGeneration(query *Query) func(nodeIndex, nodeIndex) int { +func compareByGeneration(query *query) func(nodeIndex, nodeIndex) int { return func(left, right nodeIndex) int { leftGeneration := query.effectiveGeneration(left) rightGeneration := query.effectiveGeneration(right) |
