aboutsummaryrefslogtreecommitdiff
path: root/commitquery/ancestor.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-28 17:40:02 +0000
committerGravatar Runxi Yu2026-03-28 17:40:02 +0000
commit06583274fa64ad6677773bf4ca54f69226388203 (patch)
tree66354bf972d267bf7ee5135eb7e5b90c31f9fe4d /commitquery/ancestor.go
parentformat/commitgraph/read: Lifetime (diff)
signatureNo signature
commitquery: Make a reusable engine thingy
Diffstat (limited to 'commitquery/ancestor.go')
-rw-r--r--commitquery/ancestor.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commitquery/ancestor.go b/commitquery/ancestor.go
index 4f182a95..6a43babb 100644
--- a/commitquery/ancestor.go
+++ b/commitquery/ancestor.go
@@ -6,7 +6,7 @@ import objectid "codeberg.org/lindenii/furgit/object/id"
// commit parent edges.
//
// Both inputs are peeled through annotated tags before commit traversal.
-func (query *Query) IsAncestor(ancestor, descendant objectid.ObjectID) (bool, error) {
+func (query *query) IsAncestor(ancestor, descendant objectid.ObjectID) (bool, error) {
ancestorIdx, err := query.resolveCommitish(ancestor)
if err != nil {
return false, err
@@ -20,7 +20,7 @@ func (query *Query) IsAncestor(ancestor, descendant objectid.ObjectID) (bool, er
return query.isAncestor(ancestorIdx, descendantIdx)
}
-func (query *Query) isAncestor(ancestor, descendant nodeIndex) (bool, error) {
+func (query *query) isAncestor(ancestor, descendant nodeIndex) (bool, error) {
if ancestor == descendant {
return true, nil
}