summaryrefslogtreecommitdiff
path: root/Functions/VCS_Info/Backends
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-09-30 14:21:59 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-09-30 21:43:37 +0000
commit7ac34a3055d87b88d8b1b28ddfe68982f6550a08 (patch)
tree94c2d4e668f00338632cea53e7eb8b3fb4255504 /Functions/VCS_Info/Backends
parent756526eef3e064c3ffb023ae5e5e6df42e6e9162 (diff)
downloadzsh-7ac34a3055d87b88d8b1b28ddfe68982f6550a08.tar.gz
zsh-7ac34a3055d87b88d8b1b28ddfe68982f6550a08.zip
36725: vcs_info git: Compute %b correctly when merging to detached heads.
The %b expando should be the hash prior to the merge. The hash of the merge result is available as the %i expando and via the gen-applied-string hook.
Diffstat (limited to 'Functions/VCS_Info/Backends')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git2
1 files changed, 1 insertions, 1 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 8ecc7c7f7..312f17c33 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -90,7 +90,7 @@ VCS_INFO_git_getbranch () {
elif [[ -f "${gitdir}/MERGE_HEAD" ]] ; then
gitbranch="$(${(z)gitsymref} 2> /dev/null)"
- [[ -z ${gitbranch} ]] && gitbranch="$(< ${gitdir}/MERGE_HEAD)"
+ [[ -z ${gitbranch} ]] && gitbranch="$(< ${gitdir}/ORIG_HEAD)"
elif [[ -d "${gitdir}/rebase-merge" ]] ; then
gitbranch="$(< ${gitdir}/rebase-merge/head-name)"