Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 4/9] vcs_info git: set rrn before using it
- X-seq: zsh-workers 33183
- From: Marc Finet <m.dreadlock@xxxxxxxxx>
- To: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH 4/9] vcs_info git: set rrn before using it
- Date: Tue, 16 Sep 2014 22:07:55 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=yyApviOxsuLZAq6J26yF/P1zvUJj1r+GoJiBkN66dec=; b=DxyFjMrZvncDwshc0kCDr4MhhhlsFC0u84fIqjIPr1klkc8Fi8ZyDzx8Ejk28pocDi cnzFXaBrgd1YikRkv7moOtGs7l/3pQEnNymvNLguxFyb8iKmJ9rtqWuD6UwG1DGEnisn smtsvCe/thNx2PmFKwKtn/U2yNMNAGXp2EPj49e3lAOziHHfmbq5SmtFEB3QFjp4Xfd0 sA1S2nx2rzmo6n56bupABzuqpHyrhHvjkq678Fp9UChIYL+3fm59g7YYwwzMS4vCfNg/ 4Nmc4HJBxH3FbHGqE69C+1+yS/pvrjlBZDe42uFSVI51M9lYOs4TrPuSiNqNISIrSKMv 4t9Q==
- In-reply-to: <8738bu8s34.fsf@ft.bewatermyfriend.org>
- 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: <1410557443-24178-1-git-send-email-m.dreadlock@gmail.com> <1410557443-24178-5-git-send-email-m.dreadlock@gmail.com> <8738bu8s34.fsf@ft.bewatermyfriend.org>
On Sun, 14 Sep 2014 11:33:03 +0200
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> Marc Finet wrote:
> > This would fix setting check-for-changes or
> > check-for-staged-changes per repository.
>
> This is a good catch. There is another reference of $rrn earlier
> though at
>
> if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}"
> get-revision ; then
>
> I think the chunk you moved should be moved before that.
Well spotted. Here is v2:
This would fix handling get-revision, check-for-changes or
check-for-staged-changes when set per repository.
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index
263a325..6231301 100644 ---
a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++
b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -115,6 +115,8 @@
VCS_INFO_git_getbranch () {
gitdir=${vcs_comm[gitdir]}
VCS_INFO_git_getbranch ${gitdir}
+gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
+rrn=${gitbase:t}
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ;
then gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD)
else
@@ -154,8 +156,6 @@ fi
VCS_INFO_adjust
VCS_INFO_git_getaction ${gitdir}
-gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
-rrn=${gitbase:t}
local patchdir=${gitdir}/patches/${gitbranch}
if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
--
2.1.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author