From 0893eec85fca0f76039a96cbbcd3592ff8571c24 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 29 Mar 2016 15:49:24 -0700 Subject: pretty: enable --expand-tabs by default for selected pretty formats "git log --pretty={medium,full,fuller}" and "git log" by default prepend 4 spaces to the log message, so it makes sense to enable the new "expand-tabs" facility by default for these formats. Add --no-expand-tabs option to override the new default. The change alone breaks a test in t4201 that runs "git shortlog" on the output from "git log", and expects that the output from "git log" does not do such a tab expansion. Adjust the test to explicitly disable expand-tabs with --no-expand-tabs. Signed-off-by: Junio C Hamano --- builtin/log.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/log.c') diff --git a/builtin/log.c b/builtin/log.c index e00cea75cc..e5775ae4d1 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1281,6 +1281,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) git_config(git_format_config, NULL); init_revisions(&rev, prefix); rev.commit_format = CMIT_FMT_EMAIL; + rev.expand_tabs_in_log_default = 0; rev.verbose_header = 1; rev.diff = 1; rev.max_parents = 1; -- cgit v1.3-5-g9baa