diff options
| author | 2026-02-20 22:30:57 +0800 | |
|---|---|---|
| committer | 2026-02-20 22:30:57 +0800 | |
| commit | bb5b5334c74026c0a46f48cf2418038e0d909e9b (patch) | |
| tree | a5520e55b904a1f973898858e2278f0be294a34b /object/commit_parse.go | |
| parent | object: Use objectheader (diff) | |
| signature | No signature | |
object: Remove the old opaque errors
Diffstat (limited to 'object/commit_parse.go')
| -rw-r--r-- | object/commit_parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
