Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 3f4a030

Browse files
authored
Merge pull request #477 from taralx/patch-2
git: remove ErrObjectNotFound in favor of plumbing.ErrObjectNotFound
2 parents df946d7 + 51005a2 commit 3f4a030

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

repository.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
)
2323

2424
var (
25-
ErrObjectNotFound = errors.New("object not found")
2625
ErrInvalidReference = errors.New("invalid reference, should be a tag or a branch")
2726
ErrRepositoryNotExists = errors.New("repository not exists")
2827
ErrRepositoryAlreadyExists = errors.New("repository already exists")
@@ -804,10 +803,6 @@ func (r *Repository) TagObjects() (*object.TagIter, error) {
804803
func (r *Repository) Object(t plumbing.ObjectType, h plumbing.Hash) (object.Object, error) {
805804
obj, err := r.Storer.EncodedObject(t, h)
806805
if err != nil {
807-
if err == plumbing.ErrObjectNotFound {
808-
return nil, ErrObjectNotFound
809-
}
810-
811806
return nil, err
812807
}
813808

0 commit comments

Comments
 (0)