Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/3] vcs_info/git: set vcs_comm[basedir] in VCS_INFO_detect_git
- X-seq: zsh-workers 44919
- From: Aleksandr Mezin <mezin.alexander@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 1/3] vcs_info/git: set vcs_comm[basedir] in VCS_INFO_detect_git
- Date: Sun, 24 Nov 2019 04:14:41 +0600
- Cc: Aleksandr Mezin <mezin.alexander@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LLbo1XPCRsL8nBFhSww4ScqOrYSl7wcuO76iRoSiVQ4=; b=bGw5c3N27K52PgmQdLCg2ilamWi3nDGzZZDEaG5h685H1jIeLm6utckT5qMKODoyxo p+Zhe7+wxm9+aNufc/5V91WmmMhIl51gDtIXTUCvPeaheAt9KzefiTe7asivpAjKEimn 0ceveOXRcbHl081K+mFShYsTFgHzwiaqfT8oWwroeUkfa9of/GiVG3J/luuRKFIYk0Ez R6dO1j6ljiBbdvedn+HGLmEpU/xNlbVsJgbCePKpAhBnL21GdokgulZlgdMDfQKnRGEx b9bNeiEfDlvFsnDl75e0Ojv/DcHz9v/pR6B5PiU2B1/nj8ZduwxS3bkG3XAbBMUajzxE CUGg==
- In-reply-to: <20191123221443.279556-1-mezin.alexander@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20191123221443.279556-1-mezin.alexander@gmail.com>
---
Functions/VCS_Info/Backends/VCS_INFO_detect_git | 1 +
Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_git b/Functions/VCS_Info/Backends/VCS_INFO_detect_git
index 61bc483e3..a3dbca105 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_detect_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_git
@@ -8,6 +8,7 @@ setopt localoptions NO_shwordsplit
if VCS_INFO_check_com ${vcs_comm[cmd]} && ${vcs_comm[cmd]} rev-parse --is-inside-work-tree &> /dev/null ; then
vcs_comm[gitdir]="$(${vcs_comm[cmd]} rev-parse --git-dir 2> /dev/null)" || return 1
+ vcs_comm[basedir]="$( ${vcs_comm[cmd]} rev-parse --show-toplevel )" || return 1
if [[ -d ${vcs_comm[gitdir]}/svn ]] ; then vcs_comm[overwrite_name]='git-svn'
elif [[ -d ${vcs_comm[gitdir]}/refs/remotes/p4 ]] ; then vcs_comm[overwrite_name]='git-p4' ; fi
return 0
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index ceb4f978a..8ecd96ccc 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -138,7 +138,7 @@ VCS_INFO_git_handle_patches () {
gitdir=${vcs_comm[gitdir]}
VCS_INFO_git_getbranch ${gitdir}
-gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
+gitbase=${vcs_comm[basedir]}
rrn=${gitbase:t}
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD)
--
2.24.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author