зеркало из https://github.com/microsoft/git.git
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
95518faac1
Коммит
4439c7a360
|
@ -3568,7 +3568,7 @@ static int do_merge(struct repository *r,
|
||||||
goto leave_merge;
|
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);
|
git_path_merge_head(r), 0);
|
||||||
write_message("no-ff", 5, git_path_merge_mode(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;
|
char *p;
|
||||||
|
|
||||||
strbuf_reset(&state->buf);
|
strbuf_reset(&state->buf);
|
||||||
strbuf_grow(&state->buf, GIT_SHA1_HEXSZ);
|
strbuf_grow(&state->buf, GIT_MAX_HEXSZ);
|
||||||
label = p = state->buf.buf;
|
label = p = state->buf.buf;
|
||||||
|
|
||||||
find_unique_abbrev_r(p, oid, default_abbrev);
|
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;
|
size_t i = strlen(p) + 1;
|
||||||
|
|
||||||
oid_to_hex_r(p, oid);
|
oid_to_hex_r(p, oid);
|
||||||
for (; i < GIT_SHA1_HEXSZ; i++) {
|
for (; i < the_hash_algo->hexsz; i++) {
|
||||||
char save = p[i];
|
char save = p[i];
|
||||||
p[i] = '\0';
|
p[i] = '\0';
|
||||||
if (!hashmap_get_from_hash(&state->labels,
|
if (!hashmap_get_from_hash(&state->labels,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче