path: root/patch-ids.h
diff options
authorbrian m. carlson <>2017-03-26 16:01:25 (GMT)
committerJunio C Hamano <>2017-03-27 05:08:21 (GMT)
commitcd02599c480570484ec0a38a5bf66ac69ee3dd19 (patch)
treed3c301f3e0be64d16704399d36fe18019dc64a38 /patch-ids.h
parentdc01505f7f272a44b974e622f75bd592debe9dcb (diff)
Convert GIT_SHA1_RAWSZ used for allocation to GIT_MAX_RAWSZ
Since we will likely be introducing a new hash function at some point, and that hash function might be longer than 20 bytes, use the constant GIT_MAX_RAWSZ, which is designed to be suitable for allocations, instead of GIT_SHA1_RAWSZ. This will ease the transition down the line by distinguishing between places where we need to allocate memory suitable for the largest hash from those where we need to handle the current hash. Signed-off-by: brian m. carlson <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'patch-ids.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/patch-ids.h b/patch-ids.h
index 0f34ea1..b9e5751 100644
--- a/patch-ids.h
+++ b/patch-ids.h
@@ -3,7 +3,7 @@
struct patch_id {
struct hashmap_entry ent;
- unsigned char patch_id[GIT_SHA1_RAWSZ];
+ unsigned char patch_id[GIT_MAX_RAWSZ];
struct commit *commit;