mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 16:40:24 +02:00
36725: vcs_info git: Compute %b correctly when "git am"-ing onto detached heads.
Before this patch, $gitbranch would be set to empty, which caused VCS_INFO_get_data_git to early out with a failure status¹, consequently $vcs_info_msg_0_ would be empty. ¹ via the 'if [[ -z ]]' block around line 170.
This commit is contained in:
parent
cd1cda9d57
commit
a90cf551ef
2 changed files with 5 additions and 0 deletions
|
@ -87,6 +87,7 @@ VCS_INFO_git_getbranch () {
|
|||
gitbranch="$(${(z)gitsymref} 2> /dev/null)"
|
||||
[[ -z ${gitbranch} ]] && [[ -r ${actiondir}/head-name ]] \
|
||||
&& gitbranch="$(< ${actiondir}/head-name)"
|
||||
[[ -z ${gitbranch} ]] && gitbranch="$(< ${gitdir}/ORIG_HEAD)"
|
||||
|
||||
elif [[ -f "${gitdir}/MERGE_HEAD" ]] ; then
|
||||
gitbranch="$(${(z)gitsymref} 2> /dev/null)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue