aboutsummaryrefslogtreecommitdiff
path: root/obj.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-22 08:00:00 +0800
committerGravatar Runxi Yu2025-11-22 08:00:00 +0800
commit65600ea051adc75d09e9763fb6e11e79602f76b6 (patch)
treee6bdbb8b6108026667dfdb08b2639d171c6c4392 /obj.go
parentobj: call parseObjectBody in ReadObject instead of loose/pack readers (diff)
signatureNo signature
obj: Return ErrNotFound, not ErrInvalidObject, when not found in packs
Diffstat (limited to 'obj.go')
-rw-r--r--obj.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/obj.go b/obj.go
index 4156c36c..4f43b8ad 100644
--- a/obj.go
+++ b/obj.go
@@ -106,7 +106,7 @@ func (repo *Repository) ReadObject(id Hash) (StoredObject, error) {
}
ty, body, err = repo.packRead(id)
if errors.Is(err, ErrNotFound) {
- return nil, ErrInvalidObject
+ return nil, ErrNotFound
}
if err != nil {
return nil, err