cocci: apply the "commit.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
cb338c23d6
commit
ecb5091fd4
@ -712,7 +712,7 @@ static void prepare_amend_commit(struct commit *commit, struct strbuf *sb,
|
||||
{
|
||||
const char *buffer, *subject, *fmt;
|
||||
|
||||
buffer = get_commit_buffer(commit, NULL);
|
||||
buffer = repo_get_commit_buffer(the_repository, commit, NULL);
|
||||
find_commit_subject(buffer, &subject);
|
||||
/*
|
||||
* If we amend the 'amend!' commit then we don't want to
|
||||
@ -720,7 +720,7 @@ static void prepare_amend_commit(struct commit *commit, struct strbuf *sb,
|
||||
*/
|
||||
fmt = starts_with(subject, "amend!") ? "%b" : "%B";
|
||||
format_commit_message(commit, fmt, sb, ctx);
|
||||
unuse_commit_buffer(commit, buffer);
|
||||
repo_unuse_commit_buffer(the_repository, commit, buffer);
|
||||
}
|
||||
|
||||
static int prepare_to_commit(const char *index_file, const char *prefix,
|
||||
@ -1183,7 +1183,7 @@ static const char *read_commit_message(const char *name)
|
||||
if (!commit)
|
||||
die(_("could not lookup commit %s"), name);
|
||||
out_enc = get_commit_output_encoding();
|
||||
return logmsg_reencode(commit, NULL, out_enc);
|
||||
return repo_logmsg_reencode(the_repository, commit, NULL, out_enc);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1718,7 +1718,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
|
||||
current_head = NULL;
|
||||
else {
|
||||
current_head = lookup_commit_or_die(&oid, "HEAD");
|
||||
if (parse_commit(current_head))
|
||||
if (repo_parse_commit(the_repository, current_head))
|
||||
die(_("could not parse HEAD commit"));
|
||||
}
|
||||
verbose = -1; /* unspecified */
|
||||
|
Reference in New Issue
Block a user