aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 00:38:50 +0800
committerGravatar Runxi Yu2026-03-07 00:38:50 +0800
commit474bcba13eddb1ae2fb2fa6340f1c4064cdcf12f (patch)
tree96e703836798d9a15e6159cda37f242fa3693f18 /internal
parentUrgh I made some wrong amends and I'm too tired to separate the commits out t... (diff)
signatureNo signature
*: Use errors.AsType
Diffstat (limited to 'internal')
-rw-r--r--internal/commitquery/oid.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/commitquery/oid.go b/internal/commitquery/oid.go
index 7ba05eb5..ab40f96e 100644
--- a/internal/commitquery/oid.go
+++ b/internal/commitquery/oid.go
@@ -53,8 +53,7 @@ func (ctx *Context) loadByOID(idx NodeIndex) error {
if ctx.graph != nil {
pos, err := ctx.graph.Lookup(id)
if err != nil {
- var notFound *commitgraphread.NotFoundError
- if !stderrors.As(err, &notFound) {
+ if _, ok := stderrors.AsType[*commitgraphread.NotFoundError](err); !ok {
return err
}
} else {