From eeff805e0bcdab5317ed1027bef2b625a8f7f94b Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Tue, 10 Dec 2013 19:58:09 +0200 Subject: fix for issue #37 (branch detection with new git) --- git-prompt.sh | 10 +++++----- 1 file 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 ' )" -- cgit v1.2.3