Skip to content

Commit

Permalink
Merge branch 'lt/log-auto-decorate'
Browse files Browse the repository at this point in the history
* lt/log-auto-decorate:
  git log: support "auto" decorations
  • Loading branch information
Junio C Hamano committed Jun 16, 2014
2 parents 668668a + 1571586 commit 3009afd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3009afd

Please sign in to comment.