Skip to content

Commit 4439c7a

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 95518fa commit 4439c7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sequencer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3568,7 +3568,7 @@ static int do_merge(struct repository *r,
35683568
goto leave_merge;
35693569
}
35703570

3571-
write_message(oid_to_hex(&merge_commit->object.oid), GIT_SHA1_HEXSZ,
3571+
write_message(oid_to_hex(&merge_commit->object.oid), the_hash_algo->hexsz,
35723572
git_path_merge_head(r), 0);
35733573
write_message("no-ff", 5, git_path_merge_mode(r), 0);
35743574

@@ -4487,7 +4487,7 @@ static const char *label_oid(struct object_id *oid, const char *label,
44874487
char *p;
44884488

44894489
strbuf_reset(&state->buf);
4490-
strbuf_grow(&state->buf, GIT_SHA1_HEXSZ);
4490+
strbuf_grow(&state->buf, GIT_MAX_HEXSZ);
44914491
label = p = state->buf.buf;
44924492

44934493
find_unique_abbrev_r(p, oid, default_abbrev);
@@ -4500,7 +4500,7 @@ static const char *label_oid(struct object_id *oid, const char *label,
45004500
size_t i = strlen(p) + 1;
45014501

45024502
oid_to_hex_r(p, oid);
4503-
for (; i < GIT_SHA1_HEXSZ; i++) {
4503+
for (; i < the_hash_algo->hexsz; i++) {
45044504
char save = p[i];
45054505
p[i] = '\0';
45064506
if (!hashmap_get_from_hash(&state->labels,

0 commit comments

Comments
 (0)