1
0
mirror of https://github.com/git/git.git synced 2024-10-19 17:38:39 +02:00

Merge branch 'lt/log-auto-decorate'

* lt/log-auto-decorate:
  git log: support "auto" decorations
This commit is contained in:
Junio C Hamano 2014-06-16 12:18:41 -07:00
commit 3009afd54e

@ -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;
}