aboutsummaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-17 17:12:55 -0700
committerJunio C Hamano <gitster@pobox.com>2012-10-17 22:42:40 -0700
commite297cf5aff0264c16b6c325c0beab71bc04cd496 (patch)
tree66de5f62e9b60fab2b3fe7ef1e3c230365134894 /pretty.c
parent87a5461fa7b30f7b7baf27204f10219d61500fbf (diff)
downloadgit-e297cf5aff0264c16b6c325c0beab71bc04cd496.tar.gz
git-e297cf5aff0264c16b6c325c0beab71bc04cd496.tar.xz
pretty: remove reencode_commit_message()
This function has only two callsites, and is a thin wrapper whose usefulness is dubious. When the caller needs to learn the log output encoding, it should be able to do so by directly calling get_log_output_encoding() and calling the underlying logmsg_reencode() with it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/pretty.c b/pretty.c
index 8b1ea9ffa..c311a68fc 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1341,16 +1341,6 @@ void pp_remainder(const struct pretty_print_context *pp,
}
}
-char *reencode_commit_message(const struct commit *commit, const char **encoding_p)
-{
- const char *encoding;
-
- encoding = get_log_output_encoding();
- if (encoding_p)
- *encoding_p = encoding;
- return logmsg_reencode(commit, encoding);
-}
-
void pretty_print_commit(const struct pretty_print_context *pp,
const struct commit *commit,
struct strbuf *sb)
@@ -1367,7 +1357,8 @@ void pretty_print_commit(const struct pretty_print_context *pp,
return;
}
- reencoded = reencode_commit_message(commit, &encoding);
+ encoding = get_log_output_encoding();
+ reencoded = logmsg_reencode(commit, encoding);
if (reencoded) {
msg = reencoded;
}