diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-16 12:18:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-16 12:18:41 -0700 |
commit | 3009afd54ecbac1b7cd556085cd2d32f3d6772d3 (patch) | |
tree | a1ce7a12c870ed3b0c38f0475782db4289af5452 /builtin | |
parent | Merge branch 'jm/doc-wording-tweaks' (diff) | |
parent | git log: support "auto" decorations (diff) | |
download | tgif-3009afd54ecbac1b7cd556085cd2d32f3d6772d3.tar.xz |
Merge branch 'lt/log-auto-decorate'
* lt/log-auto-decorate:
git log: support "auto" decorations
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c index 83b6c489fc..a7ba211731 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -63,6 +63,8 @@ static int parse_decoration_style(const char *var, const char *value) return DECORATE_FULL_REFS; else if (!strcmp(value, "short")) return DECORATE_SHORT_REFS; + else if (!strcmp(value, "auto")) + return (isatty(1) || pager_in_use()) ? DECORATE_SHORT_REFS : 0; return -1; } |