summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Yalon <amir@seekingalpha.com>2012-07-06 19:53:15 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2012-07-06 19:53:15 +0300
commit39902fdab4b23e04018101098e8d37352488f5c5 (patch)
treed1da888d6fc69f42e31cdd162e17fe6182ab11ef
parentMerge pull request #23 from ronnix/master (diff)
parentFix Git freshness check with special chars (diff)
downloadgit-prompt-39902fdab4b23e04018101098e8d37352488f5c5.tar.gz
git-prompt-39902fdab4b23e04018101098e8d37352488f5c5.tar.bz2
git-prompt-39902fdab4b23e04018101098e8d37352488f5c5.zip
Merge branch 'master' of https://github.com/amiryal/git-prompt into amiryal-master
Conflicts: git-prompt.sh
-rwxr-xr-xgit-prompt.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index 306d96b..8bdbb3f 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -430,10 +430,9 @@ parse_git_status() {
s/^# On branch /branch=/p
s/^nothing to commi.*/clean=clean/p
s/^# Initial commi.*/init=init/p
-
- s/^# Your branch is ahead of .[/[:alnum:]]\+. by [[:digit:]]\+ commit.*/freshness=${WHITE}↑/p
- s/^# Your branch is behind .[/[:alnum:]]\+. by [[:digit:]]\+ commit.*/freshness=${YELLOW}↓/p
- s/^# Your branch and .[/[:alnum:]]\+. have diverged.*/freshness=${YELLOW}↕/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
'
)"