mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 05:10:28 +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
|
|
@ -1,5 +1,9 @@
|
|||
2015-11-30 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 37252: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
|
||||
vcs_info git: Compute %b correctly with "rebase --onto" of
|
||||
detached heads. (Follow-up to 36725.)
|
||||
|
||||
* 37254: Src/params.c: No functional change: change code layout
|
||||
in preparation for 37253.
|
||||
|
||||
|
|
|
|||
|
|
@ -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