40:48d26a4c35ba
Anton Shestakov <engored@ya.ru>, 2014-08-28
Ahead/behind commit count.

next change 42:34ee83bd5ad2
previous change 39:06ada8ea9a31

.bash_prompt

Other formats: Feeds:
--- a/.bash_prompt Wed Aug 27 22:21:17 2014 +0900
+++ b/.bash_prompt Thu Aug 28 17:59:32 2014 +0900
@@ -73,9 +73,11 @@
if [[ $GIT_STATUS == *'Your branch is behind'* ]]; then
local GIT_BEHIND="$R^"
+ [[ $GIT_STATUS =~ behind[^$'\n']+([0-9]+)' 'commit ]] && GIT_BEHIND+=${BASH_REMATCH[1]}
fi
if [[ $GIT_STATUS == *'Your branch is ahead'* ]]; then
local GIT_AHEAD="$Y^"
+ [[ $GIT_STATUS =~ ahead[^$'\n']+([0-9]+)' 'commit ]] && GIT_AHEAD+=${BASH_REMATCH[1]}
fi
if [[ $GIT_STATUS == *'Changes to be committed'* ]]; then
local GIT_STAGED="$R!"