aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-16 12:18:41 -0700
committerJunio C Hamano <gitster@pobox.com>2014-06-16 12:18:41 -0700
commit3009afd54ecbac1b7cd556085cd2d32f3d6772d3 (patch)
treea1ce7a12c870ed3b0c38f0475782db4289af5452 /builtin
parent668668ad5064c66d4040cfef5814ec1353c2e3d1 (diff)
parent1571586648da4e2d759bce1146d5585c91aca8d6 (diff)
downloadgit-3009afd54ecbac1b7cd556085cd2d32f3d6772d3.tar.gz
git-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 83b6c489f..a7ba21173 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;
}