From: brian m. carlson Date: Mon, 16 Jul 2018 01:27:56 +0000 (+0000) Subject: commit: express tree entry constants in terms of the_hash_algo X-Git-Tag: v2.19.0-rc0~112^2~12 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2770ccbdb23d6a02e60d5df3f70e476b8ea65262?ds=inline;hp=--cc commit: express tree entry constants in terms of the_hash_algo Specify these constants in terms of the size of the hash algorithm currently in use. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- 2770ccbdb23d6a02e60d5df3f70e476b8ea65262 diff --git a/commit.c b/commit.c index 0c3b75aeff..ff05d04570 100644 --- a/commit.c +++ b/commit.c @@ -364,8 +364,8 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s struct object_id parent; struct commit_list **pptr; struct commit_graft *graft; - const int tree_entry_len = GIT_SHA1_HEXSZ + 5; - const int parent_entry_len = GIT_SHA1_HEXSZ + 7; + const int tree_entry_len = the_hash_algo->hexsz + 5; + const int parent_entry_len = the_hash_algo->hexsz + 7; if (item->object.parsed) return 0;