aboutsummaryrefslogtreecommitdiff
path: root/reachability/walk_expand_objects.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 21:19:56 +0800
committerGravatar Runxi Yu2026-03-07 00:34:30 +0800
commit01d15bccf3b1dcc51516b1f64d50950b31d7f8fb (patch)
treee491fcc762c67c1ef4ce54faafc5dafdb734ae8a /reachability/walk_expand_objects.go
parentobjectstored/refstore: Weird ireturn behavior (diff)
signatureNo signature
Urgh I made some wrong amends and I'm too tired to separate the commits out this time
ancestor: Split out of reachability mergebase: Add merge base routines internal/commitquery: Add commit query context engine thingy internal/peel: Shared tag peeling errors: Shared object query errors internal/testgit: Add rooted repo helpers; remove raw path access objectstore/memory: Add in-memory object store objectid: Add Compare helper
Diffstat (limited to 'reachability/walk_expand_objects.go')
-rw-r--r--reachability/walk_expand_objects.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/reachability/walk_expand_objects.go b/reachability/walk_expand_objects.go
index 9dc2ff80..1f634c26 100644
--- a/reachability/walk_expand_objects.go
+++ b/reachability/walk_expand_objects.go
@@ -3,6 +3,7 @@ package reachability
import (
"fmt"
+ "codeberg.org/lindenii/furgit/errors"
"codeberg.org/lindenii/furgit/object"
"codeberg.org/lindenii/furgit/objecttype"
)
@@ -14,7 +15,7 @@ func (walk *Walk) expandObjects(item walkItem) ([]walkItem, error) {
}
if item.want != objecttype.TypeInvalid && ty != item.want {
- return nil, &ObjectTypeError{OID: item.id, Got: ty, Want: item.want}
+ return nil, &errors.ObjectTypeError{OID: item.id, Got: ty, Want: item.want}
}
switch ty {
@@ -76,7 +77,7 @@ func (walk *Walk) expandObjects(item walkItem) ([]walkItem, error) {
return []walkItem{{id: tag.Target, want: tag.TargetType}}, nil
case objecttype.TypeInvalid, objecttype.TypeFuture, objecttype.TypeOfsDelta, objecttype.TypeRefDelta:
- return nil, &ObjectTypeError{OID: item.id, Got: ty, Want: item.want}
+ return nil, &errors.ObjectTypeError{OID: item.id, Got: ty, Want: item.want}
}
return nil, fmt.Errorf("reachability: unreachable object type %d", ty)