Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/2] Changed Git revision lookup behavior to invoke Git directly.
- X-seq: zsh-workers 28114
- From: Seth House <seth@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 2/2] Changed Git revision lookup behavior to invoke Git directly.
- Date: Mon, 2 Aug 2010 12:36:53 -0600
- Cc: Seth House <seth@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=956L3z2JpjNdaD6EuK3j6BSDYA2urmEHJhOwQdXMlv4=; b=BPcGK9aj8CKIJHEz/bP+zQJ2wItu4Gxpwqm/J3brVekJphgdylbv0ozb+9P8PKHAQT RNnyLqLyIuGnxWGW6KyWiyfLyFO2sb9sFLo9eoik0v/5RDJY0QGSFkTWWbT+CM09R7/b o4jtJ6f4GqdzwO8fKLW1fkRnt7EL6iV9NIFZY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=VTNcPtdh6YrtDUxbgUe750kF+obRdcr+VWSVwORZfrTA5qbKUJsSRUzNN3xgaOCWPw gJ1SpKR2wlLJMY2IrNxqqTwF1q4XOwUczt1iuwDmU890gVpDCnHNqA+UrHXtAsx/ijwq 2DhX7wxJzANsncFeSO+RjRfKtKBrjfceAGMxc=
- In-reply-to: <1280774213-13840-1-git-send-email-seth@xxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1280774213-13840-1-git-send-email-seth@xxxxxxxxx>
- Sender: Seth House <whiteinge@xxxxxxxxx>
This fixes a bug where the revision was empty for the time between when
Git packs refs and you make a commit.
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 979f017..01bf9f3 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
--
1.7.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author