summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbash-git-prompt20
1 files changed, 12 insertions, 8 deletions
diff --git a/bash-git-prompt b/bash-git-prompt
index 85d1bd0..b61d606 100755
--- a/bash-git-prompt
+++ b/bash-git-prompt
@@ -26,14 +26,18 @@ then
)"
echo "$status" | grep -q "^.\S" && wtClean=false || wtClean=true
echo "$status" | grep -q "^\S" && idxClean=false || idxClean=true
- remBranch="$(
- echo "${branches}" | \
- grep '^\s*remotes/[^/]\+/'"${branch}" | \
- sed 's|^\s*\(remotes/[^/]\+/'"${branch}"'\)/.*$|\1|'
- )"
- [ -n "${remBranch}" ] && \
- [ "$(git describe --always --abbrev=0 "HEAD")" == "$(git describe --always --abbrev=0 "${remBranch}")" ] && \
- remClean=true || remClean=false
+
+ remClean=true
+ for remBranch in \
+ $(
+ echo "${branches}" | \
+ grep '^\s*remotes/[^/]\+/'"${branch}" | \
+ sed 's|^\s*\(remotes/[^/]\+/'"${branch}"'\)/.*$|\1|'
+ )
+ do
+ [ "$(git describe --always --abbrev=0 "HEAD")" == "$(git describe --always --abbrev=0 "${remBranch}")" ] \
+ || remClean=false
+ done
if $mitFarbe
then
if ! $wtClean