summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-18 16:02:09 +0200
committerErich Eckner <git@eckner.net>2016-04-18 16:02:09 +0200
commit3140309e829a5895fd64e4681e1ae2d251da6c45 (patch)
tree3b99777db920ee230b63c3ec7cd2ad17c3d16eed
parent29c29d0e5730811cfda0cbfa64d0f5e2027d234e (diff)
downloadbash-git-prompt-3140309e829a5895fd64e4681e1ae2d251da6c45.tar.xz
bare repositories don't get a promptv0.6
-rwxr-xr-xbash-git-prompt3
1 files changed, 1 insertions, 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