From ecb5091fd4301ac647db0bd2504112b38f7ee06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:48 +0200 Subject: cocci: apply the "commit.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- pretty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pretty.c') diff --git a/pretty.c b/pretty.c index 1e1e21878c..7e1614f67f 100644 --- a/pretty.c +++ b/pretty.c @@ -2204,7 +2204,8 @@ void pretty_print_commit(struct pretty_print_context *pp, } 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; @@ -2261,7 +2262,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, -- cgit v1.2.3 From bab821646a74c446370fa8d01ca851f247df5033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:51 +0200 Subject: cocci: apply the "pretty.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "pretty.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- pretty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pretty.c') diff --git a/pretty.c b/pretty.c index 7e1614f67f..076d1c363e 100644 --- a/pretty.c +++ b/pretty.c @@ -2199,7 +2199,8 @@ 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; } -- cgit v1.2.3 From c7c33f50bd1bb168a8c69157a0735ded84084f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:57 +0200 Subject: post-cocci: adjust comments for recent repo_* migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preceding commits we changed many calls to macros that were providing a "the_repository" argument to invoke corresponding repo_*() function instead. Let's follow-up and adjust references to those in comments, which coccinelle didn't (and inherently can't) catch. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- pretty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pretty.c') diff --git a/pretty.c b/pretty.c index 076d1c363e..23ac06b93f 100644 --- a/pretty.c +++ b/pretty.c @@ -719,7 +719,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)) -- cgit v1.2.3