diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-11 14:24:46 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-11 14:24:46 +0900 |
commit | 676278f8ea1b9bdd8f235eceb739d7aec4f0ed67 (patch) | |
tree | 1fffd7eb97b1f32a45e89d49ab3f9613265016d1 /sequencer.c | |
parent | Merge branch 'en/clean-nested-with-ignored' (diff) | |
parent | midx: switch to using the_hash_algo (diff) | |
download | tgif-676278f8ea1b9bdd8f235eceb739d7aec4f0ed67.tar.xz |
Merge branch 'bc/object-id-part17'
Preparation for SHA-256 upgrade continues.
* bc/object-id-part17: (26 commits)
midx: switch to using the_hash_algo
builtin/show-index: replace sha1_to_hex
rerere: replace sha1_to_hex
builtin/receive-pack: replace sha1_to_hex
builtin/index-pack: replace sha1_to_hex
packfile: replace sha1_to_hex
wt-status: convert struct wt_status to object_id
cache: remove null_sha1
builtin/worktree: switch null_sha1 to null_oid
builtin/repack: write object IDs of the proper length
pack-write: use hash_to_hex when writing checksums
sequencer: convert to use the_hash_algo
bisect: switch to using the_hash_algo
sha1-lookup: switch hard-coded constants to the_hash_algo
config: use the_hash_algo in abbrev comparison
combine-diff: replace GIT_SHA1_HEXSZ with the_hash_algo
bundle: switch to use the_hash_algo
connected: switch GIT_SHA1_HEXSZ to the_hash_algo
show-index: switch hard-coded constants to the_hash_algo
blame: remove needless comparison with GIT_SHA1_HEXSZ
...
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c index d648aaf416..ea368bcfe9 100644 --- a/sequencer.c +++ b/sequencer.c @@ -3578,7 +3578,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); @@ -4497,7 +4497,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); @@ -4510,7 +4510,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, |