pack-objects: refactor code into compute_layer_order()
[gitweb.git] / commit.c
index 39b80bd21d59ca66c113d87371cf5b0159ed2dd9..30d1af2b20660de99bed06486c11d1aef3763849 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -388,8 +388,8 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b
        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;