From 3140309e829a5895fd64e4681e1ae2d251da6c45 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 18 Apr 2016 16:02:09 +0200 Subject: bare repositories don't get a prompt --- bash-git-prompt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bash-git-prompt b/bash-git-prompt index 8306481..6a7a95a 100755 --- a/bash-git-prompt +++ b/bash-git-prompt @@ -16,10 +16,9 @@ set -o pipefail PS1="$PS1Start" -if branch=$(git branch 2>/dev/null | grep '^\*' | sed "s|^\*\s*||") +if branch=$(git branch 2>/dev/null | grep '^\*' | sed "s|^\*\s*||") && status=$(git status --porcelain 2> /dev/null) then PS1="$PS1 " - status=$(git status --porcelain) echo "$status" | grep -q "^.\S" && wtClean=false || wtClean=true echo "$status" | grep -q "^\S" && idxClean=false || idxClean=true if $mitFarbe -- cgit v1.2.3-70-g09d2