mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +02:00
37252: vcs_info git: Compute %b correctly with "rebase --onto" of detached heads. (Follow-up to 36725.)
This commit is contained in:
parent
4202c90b6d
commit
502d55c014
2 changed files with 6 additions and 1 deletions
|
@ -87,7 +87,8 @@ 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)"
|
||||
[[ -z ${gitbranch} || ${gitbranch} == 'detached HEAD' ]] \
|
||||
&& 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