diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2013-12-10 19:58:09 +0200 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2013-12-10 19:58:09 +0200 |
commit | eeff805e0bcdab5317ed1027bef2b625a8f7f94b (patch) | |
tree | 7c0c378bbf9c3ff8bb194542bbc4bf19a53da3cf /git-prompt.sh | |
parent | fixed: filenames with special chars (diff) | |
download | git-prompt-eeff805e0bcdab5317ed1027bef2b625a8f7f94b.tar.gz git-prompt-eeff805e0bcdab5317ed1027bef2b625a8f7f94b.tar.bz2 git-prompt-eeff805e0bcdab5317ed1027bef2b625a8f7f94b.zip |
fix for issue #37 (branch detection with new git)
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index f99a1d0..1cf4b4e 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -433,12 +433,12 @@ parse_git_status() { eval " $( git status 2>/dev/null | sed -n ' - s/^# On branch /branch=/p + s/^\(# \)*On branch /branch=/p s/^nothing to commi.*/clean=clean/p - s/^# Initial commi.*/init=init/p - s/^# Your branch is ahead of \(.\).\+\1 by [[:digit:]]\+ commit.*/freshness=${WHITE}↑/p - s/^# Your branch is behind \(.\).\+\1 by [[:digit:]]\+ commit.*/freshness=${YELLOW}↓/p - s/^# Your branch and \(.\).\+\1 have diverged.*/freshness=${YELLOW}↕/p + s/^\(# \)*Initial commi.*/init=init/p + s/^\(# \)*Your branch is ahead of \(.\).\+\1 by [[:digit:]]\+ commit.*/freshness=${WHITE}↑/p + s/^\(# \)*Your branch is behind \(.\).\+\1 by [[:digit:]]\+ commit.*/freshness=${YELLOW}↓/p + s/^\(# \)*Your branch and \(.\).\+\1 have diverged.*/freshness=${YELLOW}↕/p ' )" |