From 13fa83b24e560aeec08f34372858567b990287d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Tue, 20 Nov 2018 14:41:07 -0300 Subject: [PATCH] git-standup: ensure color usage Git may fail to detect that the tty supports colors and fallbacks to non-colored output. This overrides that by specifying the color parameter. Based on kamranahmedse/git-standup#84 --- bin/git-standup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/git-standup b/bin/git-standup index 645159982..d73844d2c 100755 --- a/bin/git-standup +++ b/bin/git-standup @@ -43,6 +43,7 @@ if [[ -t 1 ]] && [[ -n "$ncolors" ]] && [[ "$ncolors" -ge 8 ]] ; then BOLD=$(tput bold) UNDERLINE=$(tput smul) NORMAL=$(tput sgr0) + COLOR=always else RED="" GREEN="" @@ -52,6 +53,7 @@ else BOLD="" UNDERLINE="" NORMAL="" + COLOR=never fi # Only enable exit-on-error after the non-critical colorization stuff, @@ -153,6 +155,7 @@ GIT_LOG_COMMAND="git --no-pager log \ --author=\"$AUTHOR\" --abbrev-commit --oneline + --color=$COLOR --pretty=format:'$GIT_PRETTY_FORMAT' --date='$GIT_DATE_FORMAT'"