Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
commit: express tree entry constants in terms of the_hash_algo
author
brian m. carlson
<sandals@crustytoothpaste.net>
Mon, 16 Jul 2018 01:27:56 +0000
(
01:27
+0000)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 16 Jul 2018 21:27:39 +0000
(14:27 -0700)
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>
commit.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
d9cd734
)
diff --git
a/commit.c
b/commit.c
index 0c3b75aeffea75956adf2190e763b0d753c848c5..ff05d0457006e46dc2df4aecaf30f525b7e082f2 100644
(file)
--- 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;