From 4439c7a360a23c39e6dea3c9aae080c3c64eb6b6 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 18 Aug 2019 20:04:16 +0000 Subject: [PATCH] sequencer: convert to use the_hash_algo Convert several uses of GIT_SHA1_HEXSZ constants to be references to the_hash_algo. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index 34ebf8ed94..4d25e79137 100644 --- a/sequencer.c +++ b/sequencer.c @@ -3568,7 +3568,7 @@ static int do_merge(struct repository *r, goto leave_merge; } - write_message(oid_to_hex(&merge_commit->object.oid), GIT_SHA1_HEXSZ, + write_message(oid_to_hex(&merge_commit->object.oid), the_hash_algo->hexsz, git_path_merge_head(r), 0); write_message("no-ff", 5, git_path_merge_mode(r), 0); @@ -4487,7 +4487,7 @@ static const char *label_oid(struct object_id *oid, const char *label, char *p; strbuf_reset(&state->buf); - strbuf_grow(&state->buf, GIT_SHA1_HEXSZ); + strbuf_grow(&state->buf, GIT_MAX_HEXSZ); label = p = state->buf.buf; find_unique_abbrev_r(p, oid, default_abbrev); @@ -4500,7 +4500,7 @@ static const char *label_oid(struct object_id *oid, const char *label, size_t i = strlen(p) + 1; oid_to_hex_r(p, oid); - for (; i < GIT_SHA1_HEXSZ; i++) { + for (; i < the_hash_algo->hexsz; i++) { char save = p[i]; p[i] = '\0'; if (!hashmap_get_from_hash(&state->labels, -- 2.39.2