summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 13:58:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-03-28 14:36:45 (GMT)
commitecb5091fd4301ac647db0bd2504112b38f7ee06d (patch)
tree3b068d4dae3a26444da0fa32e8efa700a50deab6 /builtin/commit.c
parentcb338c23d6d518947bf6f7240bf30e2ec232bd3b (diff)
downloadgit-ecb5091fd4301ac647db0bd2504112b38f7ee06d.zip
git-ecb5091fd4301ac647db0bd2504112b38f7ee06d.tar.gz
git-ecb5091fd4301ac647db0bd2504112b38f7ee06d.tar.bz2
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>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 80d1e31..bda6afc 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -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 */