Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 4/9] vcs_info git: set rrn before using it



This would fix setting check-for-changes or
check-for-staged-changes 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..b5a38da 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -126,6 +126,8 @@ if [[ -z ${gitdir} ]] || [[ -z ${gitbranch} ]] ; then
     return 1
 fi
 
+gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
+rrn=${gitbase:t}
 if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "check-for-changes" ; then
     querystaged=1
     queryunstaged=1
@@ -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