]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/rev-list.c
Convert GIT_SHA1_HEXSZ used for allocation to GIT_MAX_HEXSZ
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 26 Mar 2017 16:01:24 +0000 (16:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Mar 2017 05:08:21 +0000 (22:08 -0700)
commitdc01505f7f272a44b974e622f75bd592debe9dcb
tree7aa62babd604067a3d928edfa988391711a36007
parent5028bf628c7ebfb85d14ec7dc296b264a1c3bcd3
Convert GIT_SHA1_HEXSZ used for allocation to GIT_MAX_HEXSZ

Since we will likely be introducing a new hash function at some point,
and that hash function might be longer than 40 hex characters, use the
constant GIT_MAX_HEXSZ, which is designed to be suitable for
allocations, instead of GIT_SHA1_HEXSZ.  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>
bisect.c
builtin/blame.c
builtin/merge-index.c
builtin/merge.c
builtin/rev-list.c
diff.c
hex.c
sha1_file.c
sha1_name.c
transport.c