summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-27 09:36:35 +0200
committerErich Eckner <git@eckner.net>2016-04-27 09:36:35 +0200
commite621dbbff631d889858dbed8fef95c515055812c (patch)
tree1da8779374603dabce8aa77681eaf5b261396b62
parente137284689ca513e5c3d9225da720c9eb32846a3 (diff)
downloadbash-git-prompt-e621dbbff631d889858dbed8fef95c515055812c.tar.xz
versteht jetzt auch mehrere Remotesv0.8
-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