mirror of
https://github.com/git/git.git
synced 2024-09-25 09:51:00 +02:00
builtin/index-pack: replace sha1_to_hex
Since sha1_to_hex is limited to SHA-1, replace it with hash_to_hex so this code works with other algorithms. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3a4d7aa5ae
commit
69fa337060
@ -1490,11 +1490,11 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!from_stdin) {
|
if (!from_stdin) {
|
||||||
printf("%s\n", sha1_to_hex(hash));
|
printf("%s\n", hash_to_hex(hash));
|
||||||
} else {
|
} else {
|
||||||
struct strbuf buf = STRBUF_INIT;
|
struct strbuf buf = STRBUF_INIT;
|
||||||
|
|
||||||
strbuf_addf(&buf, "%s\t%s\n", report, sha1_to_hex(hash));
|
strbuf_addf(&buf, "%s\t%s\n", report, hash_to_hex(hash));
|
||||||
write_or_die(1, buf.buf, buf.len);
|
write_or_die(1, buf.buf, buf.len);
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user