summaryrefslogtreecommitdiff
path: root/bisect.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-08-18 20:04:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 22:04:58 (GMT)
commit95518faac1828d077de09b4049c9c4a6602c8ae2 (patch)
tree8c4b2a6b382d0ee46ce90a450e55f12d52f4f93c /bisect.c
parente84f3572bd9160f281629bb2a098b35ea87c10e1 (diff)
downloadgit-95518faac1828d077de09b4049c9c4a6602c8ae2.zip
git-95518faac1828d077de09b4049c9c4a6602c8ae2.tar.gz
git-95518faac1828d077de09b4049c9c4a6602c8ae2.tar.bz2
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>
Diffstat (limited to 'bisect.c')
-rw-r--r--bisect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bisect.c b/bisect.c
index e87ac29..e81c91d 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;