1
0
mirror of https://github.com/git/git synced 2024-07-07 19:39:27 +00:00

Merge branch 'rs/bisect-oid-to-hex-fix'

Code cleanup.

* rs/bisect-oid-to-hex-fix:
  bisect: use oid_to_hex_r() instead of memcpy()+oid_to_hex()
This commit is contained in:
Junio C Hamano 2020-08-10 10:24:01 -07:00
commit 7d7f4e3a3e

View File

@ -709,7 +709,7 @@ static enum bisect_error bisect_checkout(const struct object_id *bisect_rev, int
char bisect_rev_hex[GIT_MAX_HEXSZ + 1];
enum bisect_error res = BISECT_OK;
memcpy(bisect_rev_hex, oid_to_hex(bisect_rev), the_hash_algo->hexsz + 1);
oid_to_hex_r(bisect_rev_hex, bisect_rev);
update_ref(NULL, "BISECT_EXPECTED_REV", bisect_rev, NULL, 0, UPDATE_REFS_DIE_ON_ERR);
argv_checkout[2] = bisect_rev_hex;