upload-pack: replace use of several hard-coded constants
commit55dc227d16cb0ca79ca25e89433d85bd5f806c22
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:51 +0000 (2 00:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:51 +0000 (2 13:59 +0900)
tree1bb4965cfcb459f78ad9a956149b47447ff63cb2
parentfd521245e6a2dc3c84500980951d07947f862183
upload-pack: replace use of several hard-coded constants

Update several uses of hard-coded 40-based constants to use either
the_hash_algo or GIT_MAX_HEXSZ, as appropriate.  Replace a combined use
of oid_to_hex and memcpy with oid_to_hex_r, which not only avoids the
need for a constant, but is more efficient.  Make use of parse_oid_hex
to eliminate the need for constants and simplify the code at the same
time.  Update some comments to no longer refer to SHA-1 as well.

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