bisect: switch to using the_hash_algo
Instead of using GIT_SHA1_HEXSZ, use the_hash_algo so that the code is hash size independent. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Aug 18, 2019 at 20:04 UTC
95518faac1828d077de09b4049c9c4a6602c8ae2
1 file changed
+1
-1
bisect.c
+1
-1
@@ -707,7 +707,7 @@ static int bisect_checkout(const struct object_id *bisect_rev, int no_checkout)
707
{
708
char bisect_rev_hex[GIT_MAX_HEXSZ + 1];
709
710
- memcpy(bisect_rev_hex, oid_to_hex(bisect_rev), GIT_SHA1_HEXSZ + 1);
710
+ memcpy(bisect_rev_hex, oid_to_hex(bisect_rev), the_hash_algo->hexsz + 1);
711
update_ref(NULL, "BISECT_EXPECTED_REV", bisect_rev, NULL, 0, UPDATE_REFS_DIE_ON_ERR);
712
713
argv_checkout[2] = bisect_rev_hex;