From 28eef9e17f0f9925880858430d84b3b642eb462c Mon Sep 17 00:00:00 2001 From: Toni Uebernickel Date: Tue, 9 Jun 2015 22:39:36 +0200 Subject: [PATCH] add --no-color when determining divergence --- base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.sh b/base.sh index 5be07b3..00e52eb 100644 --- a/base.sh +++ b/base.sh @@ -89,7 +89,7 @@ function build_prompt { if [[ -n $tag_at_current_commit ]]; then local is_on_a_tag=true; fi if [[ $has_upstream == true ]]; then - local commits_diff="$(git log --pretty=oneline --topo-order --left-right ${current_commit_hash}...${upstream} 2> /dev/null)" + local commits_diff="$(git log --no-color --pretty=oneline --topo-order --left-right ${current_commit_hash}...${upstream} 2> /dev/null)" local commits_ahead=$(\grep -c "^<" <<< "$commits_diff") local commits_behind=$(\grep -c "^>" <<< "$commits_diff") fi