From 5a437452edf9ba0fdd2c8739df2f5277ef11251d Mon Sep 17 00:00:00 2001 From: Amir Yalon Date: Thu, 5 Jun 2014 18:31:47 +0300 Subject: [PATCH] Remove back references in freshness detection code Correct fix for issue #37 --- git-prompt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-prompt.sh b/git-prompt.sh index d1e88b3..dd00cc7 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -444,9 +444,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 \(.\).\+\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/^\(# \)*Your branch is ahead of ..\+. by [[:digit:]]\+ commit.*/freshness=${WHITE}↑/p + s/^\(# \)*Your branch is behind ..\+. by [[:digit:]]\+ commit.*/freshness=${YELLOW}↓/p + s/^\(# \)*Your branch and ..\+. have diverged.*/freshness=${YELLOW}↕/p ' )"