]> git.ipfire.org Git - thirdparty/git.git/commit
Convert GIT_SHA1_RAWSZ used for allocation to GIT_MAX_RAWSZ
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 26 Mar 2017 16:01:25 +0000 (16:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Mar 2017 05:08:21 +0000 (22:08 -0700)
commitcd02599c480570484ec0a38a5bf66ac69ee3dd19
treed3c301f3e0be64d16704399d36fe18019dc64a38
parentdc01505f7f272a44b974e622f75bd592debe9dcb
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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/patch-id.c
builtin/receive-pack.c
cache.h
patch-ids.c
patch-ids.h
sha1_file.c
sha1_name.c
wt-status.h