aboutsummaryrefslogtreecommitdiff
path: root/reachability/helpers.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/helpers.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/helpers.go')
-rw-r--r--reachability/helpers.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/reachability/helpers.go b/reachability/helpers.go
index 9fdc99d8..02c3c726 100644
--- a/reachability/helpers.go
+++ b/reachability/helpers.go
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
+ giterrors "codeberg.org/lindenii/furgit/errors"
"codeberg.org/lindenii/furgit/objectid"
"codeberg.org/lindenii/furgit/objectstore"
"codeberg.org/lindenii/furgit/objecttype"
@@ -39,7 +40,7 @@ func (r *Reachability) readHeaderType(id objectid.ObjectID) (objecttype.Type, er
ty, _, err := r.store.ReadHeader(id)
if err != nil {
if errors.Is(err, objectstore.ErrObjectNotFound) {
- return objecttype.TypeInvalid, &ObjectMissingError{OID: id}
+ return objecttype.TypeInvalid, &giterrors.ObjectMissingError{OID: id}
}
return objecttype.TypeInvalid, err
@@ -61,7 +62,7 @@ func (r *Reachability) readBytesContent(id objectid.ObjectID) ([]byte, error) {
_, content, err := r.store.ReadBytesContent(id)
if err != nil {
if errors.Is(err, objectstore.ErrObjectNotFound) {
- return nil, &ObjectMissingError{OID: id}
+ return nil, &giterrors.ObjectMissingError{OID: id}
}
return nil, err