summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git7
2 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index e3024200a..dce5b6503 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
* Seth House: 28115: Misc/vcs_info-examples: Another git example
hook.
+ * Seth House: 28114:
+ Functions/VCS_Info/Backends/VCS_INFO_get_data_git: Fix revision
+ lookup with packed repositories.
+
2010-08-02 Peter Stephenson <pws@csr.com>
* Daiki Ueno: 28112: Src/Zle/zle_refresh.c: missing parentheses
@@ -13473,5 +13477,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5045 $
+* $Revision: 1.5046 $
*****************************************************
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 979f0177a..01bf9f3f5 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -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