From b022f7f8f3515e81d584048b4d953966dd0eb3f2 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 20 Feb 2026 22:37:22 +0800 Subject: object: I guess these checks are unnecessary --- object/commit_parse.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'object/commit_parse.go') 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) { -- cgit v1.3.1-10-gc9f91