Download:
child 41:14d2a23ab38f
parent 39:06ada8ea9a31
40:48d26a4c35ba
Anton Shestakov <engored@ya.ru>, Thu, 28 Aug 2014 17:59:32 +0900
Ahead/behind commit count.

1 файлов изменено, 2 вставок(+), 0 удалений(-) [+]
.bash_prompt file | annotate | diff | comparison | revisions
--- 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!"