summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-04-23 11:22:48 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-23 11:22:48 -0700
commite52e6f79ccc372825313890b96007985b8aa6e9c (patch)
tree10fe499658d1df9c12c1658c1bf0e28d32b8ad8d /builtin
parentMerge branch 'kb/status-ignored-optim-2' (diff)
parentpretty: support %>> that steal trailing spaces (diff)
downloadtgif-e52e6f79ccc372825313890b96007985b8aa6e9c.tar.xz
Merge branch 'nd/pretty-formats'
pretty-printing body of the commit that is stored in non UTF-8 encoding did not work well. The early part of this series fixes it. And then it adds %C(auto) specifier that turns the coloring on when we are emitting to the terminal, and adds column-aligning format directives. * nd/pretty-formats: pretty: support %>> that steal trailing spaces pretty: support truncating in %>, %< and %>< pretty: support padding placeholders, %< %> and %>< pretty: add %C(auto) for auto-coloring pretty: split color parsing into a separate function pretty: two phase conversion for non utf-8 commits utf8.c: add reencode_string_len() that can handle NULs in string utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences utf8.c: move display_mode_esc_sequence_len() for use by other functions pretty: share code between format_decoration and show_decorations pretty-formats.txt: wrap long lines pretty: get the correct encoding for --pretty:format=%e pretty: save commit encoding from logmsg_reencode if the caller needs it
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c2
-rw-r--r--builtin/commit.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 77707819af..57a487e052 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1430,7 +1430,7 @@ static void get_commit_info(struct commit *commit,
commit_info_init(ret);
encoding = get_log_output_encoding();
- message = logmsg_reencode(commit, encoding);
+ message = logmsg_reencode(commit, NULL, encoding);
get_ac_line(message, "\nauthor ",
&ret->author, &ret->author_mail,
&ret->author_time, &ret->author_tz);
diff --git a/builtin/commit.c b/builtin/commit.c
index 46204375e7..d2f30d960a 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -955,7 +955,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, out_enc);
+ return logmsg_reencode(commit, NULL, out_enc);
}
static int parse_and_validate_options(int argc, const char *argv[],