Browse Source

Merge branch 'lt/log-auto-decorate'

* lt/log-auto-decorate:
  git log: support "auto" decorations
maint
Junio C Hamano 11 years ago
parent
commit
3009afd54e
  1. 2
      builtin/log.c

2
builtin/log.c

@ -63,6 +63,8 @@ static int parse_decoration_style(const char *var, const char *value) @@ -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;
}


Loading…
Cancel
Save