68:c90c3504fbb3
Anton Shestakov <engored@ya.ru>, 2014-12-21
git prompt: show merges (without conflict)

next change 69:3e6ac54990dd
previous change 66:584e8e0b08ee

.bash_prompt

Other formats: Feeds:
--- a/.bash_prompt Sun Dec 21 17:15:55 2014 +0800
+++ b/.bash_prompt Sun Dec 21 17:16:28 2014 +0800
@@ -107,6 +107,7 @@
local STATUS=$(LC_ALL=C git status 2>/dev/null)
local BRANCH=$(grep -Po '(?<=On branch ).*$' <<< "$STATUS")
local REV=$(LC_ALL=C git rev-parse --short HEAD 2>/dev/null)
+ local MERGEREV=$(LC_ALL=C git rev-parse --short MERGE_HEAD 2>/dev/null)
local STASH=$(LC_ALL=C git stash list 2>/dev/null)
if [[ $STATUS == *'Your branch is behind'* ]] ; then
@@ -128,11 +129,14 @@
if [[ $STATUS == *'Changes not staged'* ]] ; then
local UNSTAGED="$P?"
fi
+ if [[ $STATUS == *'All conflicts fixed but you are still merging.'* ]] ; then
+ local MERGE="$B+$MERGEREV"
+ fi
if [[ ! -z $STASH ]] ; then
STASH='S'
fi
- GIT_INFO=" ${G}${BRANCH}±${REV}${BEHIND}${AHEAD}${STAGED}${UNSTAGED}${C}${STASH}${RESET}"
+ GIT_INFO=" ${G}${BRANCH}±${REV}${MERGE}${BEHIND}${AHEAD}${STAGED}${UNSTAGED}${C}${STASH}${RESET}"
}
# first find prompt in hgrc, then check it's actually enabled