mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +02:00
Seth House: 28114: vcs_info, git: Fix revision lookup with packed repositories.
This commit is contained in:
parent
67e6e030d2
commit
01b4a67310
2 changed files with 7 additions and 6 deletions
|
@ -101,11 +101,8 @@ VCS_INFO_git_getbranch () {
|
|||
|
||||
gitdir=${vcs_comm[gitdir]}
|
||||
gitbranch="$(VCS_INFO_git_getbranch ${gitdir})"
|
||||
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision && \
|
||||
[[ ${gitbranch} == refs/* ]] && \
|
||||
[[ -r "${gitdir}/${gitbranch}" ]] ; then
|
||||
|
||||
gitsha1="${"$(< $gitdir/$gitbranch)"}"
|
||||
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
|
||||
gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD)
|
||||
else
|
||||
gitsha1=''
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue