--- a/.bash_prompt Sun Dec 21 17:15:55 2014 +0800
+++ b/.bash_prompt Sun Dec 21 17:16:28 2014 +0800
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
if [[ $STATUS == *'Changes not staged'* ]] ; then
+ if [[ $STATUS == *'All conflicts fixed but you are still merging.'* ]] ; then
+ local MERGE="$B+$MERGEREV"
if [[ ! -z $STASH ]] ; then
- 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