summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-04-04 15:25:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-04-04 15:25:52 (GMT)
commite7dca80692dec7f0717d9ad6d978d0ceab90cf6a (patch)
tree3fd355c15df79b7e89ba63c906b6b5b34100513e /pretty.c
parentec2f02696157d3781fbfd410f0017c49cc1eda01 (diff)
parent4a93b899c19794c28b140bf78a13fb9c2b34f433 (diff)
downloadgit-e7dca80692dec7f0717d9ad6d978d0ceab90cf6a.zip
git-e7dca80692dec7f0717d9ad6d978d0ceab90cf6a.tar.gz
git-e7dca80692dec7f0717d9ad6d978d0ceab90cf6a.tar.bz2
Merge branch 'ab/remove-implicit-use-of-the-repository' into en/header-split-cache-h
* ab/remove-implicit-use-of-the-repository: libs: use "struct repository *" argument, not "the_repository" post-cocci: adjust comments for recent repo_* migration cocci: apply the "revision.h" part of "the_repository.pending" cocci: apply the "rerere.h" part of "the_repository.pending" cocci: apply the "refs.h" part of "the_repository.pending" cocci: apply the "promisor-remote.h" part of "the_repository.pending" cocci: apply the "packfile.h" part of "the_repository.pending" cocci: apply the "pretty.h" part of "the_repository.pending" cocci: apply the "object-store.h" part of "the_repository.pending" cocci: apply the "diff.h" part of "the_repository.pending" cocci: apply the "commit.h" part of "the_repository.pending" cocci: apply the "commit-reach.h" part of "the_repository.pending" cocci: apply the "cache.h" part of "the_repository.pending" cocci: add missing "the_repository" macros to "pending" cocci: sort "the_repository" rules by header cocci: fix incorrect & verbose "the_repository" rules cocci: remove dead rule from "the_repository.pending.cocci"
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pretty.c b/pretty.c
index 2b6d0f5..76fc4f6 100644
--- a/pretty.c
+++ b/pretty.c
@@ -723,7 +723,7 @@ const char *repo_logmsg_reencode(struct repository *r,
* Otherwise, we still want to munge the encoding header in the
* result, which will be done by modifying the buffer. If we
* are using a fresh copy, we can reuse it. But if we are using
- * the cached copy from get_commit_buffer, we need to duplicate it
+ * the cached copy from repo_get_commit_buffer, we need to duplicate it
* to avoid munging the cached copy.
*/
if (msg == get_cached_commit_buffer(r, commit, NULL))
@@ -2204,12 +2204,14 @@ void pretty_print_commit(struct pretty_print_context *pp,
int need_8bit_cte = pp->need_8bit_cte;
if (pp->fmt == CMIT_FMT_USERFORMAT) {
- format_commit_message(commit, user_format, sb, pp);
+ repo_format_commit_message(the_repository, commit,
+ user_format, sb, pp);
return;
}
encoding = get_log_output_encoding();
- msg = reencoded = logmsg_reencode(commit, NULL, encoding);
+ msg = reencoded = repo_logmsg_reencode(the_repository, commit, NULL,
+ encoding);
if (pp->fmt == CMIT_FMT_ONELINE || cmit_fmt_is_mail(pp->fmt))
indent = 0;
@@ -2266,7 +2268,7 @@ void pretty_print_commit(struct pretty_print_context *pp,
if (cmit_fmt_is_mail(pp->fmt) && sb->len <= beginning_of_body)
strbuf_addch(sb, '\n');
- unuse_commit_buffer(commit, reencoded);
+ repo_unuse_commit_buffer(the_repository, commit, reencoded);
}
void pp_commit_easy(enum cmit_fmt fmt, const struct commit *commit,