From 4f62c2bc577bbb85b65f3261c7fab7ef74def4cd Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 8 Apr 2010 10:17:17 -0700 Subject: log.decorate: only ignore it under "log --pretty=raw" Unlike notes that are often multi-line and disrupting to be placed in many output formats, a decoration is designed to be a small token that can be tacked after an existing line of the output where a commit object name sits. Disabling log.decorate for something like "log --oneline" would defeat the purpose of the configuration. We _might_ want to change it further in the future to force scripts that do not want to be broken by random end user configurations to explicitly say "log --no-decorate", but that would be an incompatible change that needs the usual multi-release-cycle deprecation process. Signed-off-by: Junio C Hamano --- builtin-log.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'builtin-log.c') diff --git a/builtin-log.c b/builtin-log.c index 7f4186f19..017fcf82c 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -108,10 +108,11 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix, } /* - * defeat log.decorate configuration interacting with --pretty + * defeat log.decorate configuration interacting with --pretty=raw * from the command line. */ - if (!decoration_given && rev->pretty_given) + if (!decoration_given && rev->pretty_given + && rev->commit_format == CMIT_FMT_RAW) decoration_style = 0; if (decoration_style) { -- cgit v1.2.1