From: brian m. carlson Date: Sun, 18 Aug 2019 20:04:15 +0000 (+0000) Subject: bisect: switch to using the_hash_algo X-Git-Tag: v2.24.0-rc0~40^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95518faac1828d077de09b4049c9c4a6602c8ae2;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/bisect.c b/bisect.c index e87ac29a51..e81c91d02c 100644 --- a/bisect.c +++ b/bisect.c @@ -707,7 +707,7 @@ static int bisect_checkout(const struct object_id *bisect_rev, int no_checkout) { char bisect_rev_hex[GIT_MAX_HEXSZ + 1]; - memcpy(bisect_rev_hex, oid_to_hex(bisect_rev), GIT_SHA1_HEXSZ + 1); + memcpy(bisect_rev_hex, oid_to_hex(bisect_rev), the_hash_algo->hexsz + 1); update_ref(NULL, "BISECT_EXPECTED_REV", bisect_rev, NULL, 0, UPDATE_REFS_DIE_ON_ERR); argv_checkout[2] = bisect_rev_hex;