From bb5b5334c74026c0a46f48cf2418038e0d909e9b Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 20 Feb 2026 22:30:57 +0800 Subject: object: Remove the old opaque errors --- object/commit_parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object/commit_parse.go') diff --git a/object/commit_parse.go b/object/commit_parse.go index acc90951..31def350 100644 --- a/object/commit_parse.go +++ b/object/commit_parse.go @@ -11,7 +11,7 @@ import ( // ParseCommit decodes a commit object body. func ParseCommit(body []byte, algo oid.Algorithm) (*Commit, error) { if algo.Size() == 0 { - return nil, ErrInvalidObject + return nil, fmt.Errorf("object: commit: invalid hash algorithm %q", algo) } c := new(Commit) @@ -79,7 +79,7 @@ func ParseCommit(body []byte, algo oid.Algorithm) (*Commit, error) { } if i > len(body) { - return nil, ErrInvalidObject + return nil, errors.New("object: commit: parser position out of bounds") } c.Message = append([]byte(nil), body[i:]...) return c, nil -- cgit v1.3.1-10-gc9f91