mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'lt/log-auto-decorate'
* lt/log-auto-decorate: git log: support "auto" decorations
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue