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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Jul 16, 2018 at 01:27 UTC 2770ccbdb23d6a02e60d5df3f70e476b8ea65262
1 file changed +2 -2
commit.c
+2 -2
@@ -364,8 +364,8 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
364 struct object_id parent;
365 struct commit_list **pptr;
366 struct commit_graft *graft;
367 - const int tree_entry_len = GIT_SHA1_HEXSZ + 5;
368 - const int parent_entry_len = GIT_SHA1_HEXSZ + 7;
367 + const int tree_entry_len = the_hash_algo->hexsz + 5;
368 + const int parent_entry_len = the_hash_algo->hexsz + 7;
369
370 if (item->object.parsed)
371 return 0;