Skip to content

Commit 2770ccb

Browse files
bk2204gitster
authored andcommitted
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>
1 parent d9cd734 commit 2770ccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
364364
struct object_id parent;
365365
struct commit_list **pptr;
366366
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;
369369

370370
if (item->object.parsed)
371371
return 0;

0 commit comments

Comments
 (0)