]> git.ipfire.org Git - thirdparty/git.git/commit - packfile.c
packfile: abstract away hash constant values
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:36 +0000 (00:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:50 +0000 (13:59 +0900)
commit37fec86a8353106dad000d498df8251ea3547855
tree1608538dc4d11c54f2fc4a7bd04eefc968c36066
parent544443cb3cca4d5e48dfd8bd3c704a7e52b89ee6
packfile: abstract away hash constant values

There are several instances of the constant 20 and 20-based values in
the packfile code.  Abstract away dependence on SHA-1 by using the
values from the_hash_algo instead.

Use unsigned values for temporary constants to provide the compiler with
more information about what kinds of values it should expect.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c