aboutsummaryrefslogtreecommitdiff
path: root/object/commit_parse.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-20 22:37:22 +0800
committerGravatar Runxi Yu2026-02-20 22:37:22 +0800
commitb022f7f8f3515e81d584048b4d953966dd0eb3f2 (patch)
treeda676656b4d6b29c9b0c0ba9c0a51ed2bc6d7add /object/commit_parse.go
parentobject: Remove the old opaque errors (diff)
signatureNo signature
object: I guess these checks are unnecessary
Diffstat (limited to 'object/commit_parse.go')
-rw-r--r--object/commit_parse.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/object/commit_parse.go b/object/commit_parse.go
index 31def350..9693b4da 100644
--- a/object/commit_parse.go
+++ b/object/commit_parse.go
@@ -10,10 +10,6 @@ import (
// ParseCommit decodes a commit object body.
func ParseCommit(body []byte, algo oid.Algorithm) (*Commit, error) {
- if algo.Size() == 0 {
- return nil, fmt.Errorf("object: commit: invalid hash algorithm %q", algo)
- }
-
c := new(Commit)
i := 0
for i < len(body) {