From bd6b021e73042e1c31673cc5b2d2a7cbc3408dda Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Wed, 27 Aug 2008 13:00:35 +0200 Subject: [PATCH] zshrc: Handle a state of git in vcs_info(), when a normal rebase conflicts This should have been handled before, but didn't due to a bug. I just ran into this state for the first time. --- etc/zsh/zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1c38fcd..7a33c2d 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1101,7 +1101,7 @@ VCS_INFO_git_getaction () { #{{{ else gitaction="am/rebase" fi - print '%s' ${gitaction} + printf '%s' ${gitaction} return 0 fi done @@ -1142,6 +1142,7 @@ VCS_INFO_git_getbranch () { #{{{ || [[ -d "${gitdir}/../.dotest" ]] \ || [[ -f "${gitdir}/MERGE_HEAD" ]] ; then gitbranch="$(${(z)gitsymref} 2> /dev/null)" + [[ -z ${gitbranch} ]] && gitbranch="$(< ${gitdir}/rebase-apply/head-name)" elif [[ -f "${gitdir}/rebase-merge/interactive" ]] \ || [[ -d "${gitdir}/rebase-merge" ]] ; then -- 2.1.4