summaryrefslogtreecommitdiffstats
path: root/Functions/VCS_Info/Backends/VCS_INFO_detect_git
diff options
context:
space:
mode:
authorAleksandr Mezin <mezin.alexander@gmail.com>2021-03-29 15:53:44 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2021-03-29 17:03:40 +0000
commitfc82e8193bad79db5de9e40ec99814fe401ad876 (patch)
tree5b4a8c7992a255e6cca8bfd6060a01e2830d533b /Functions/VCS_Info/Backends/VCS_INFO_detect_git
parent47737: _zstyle: Fix option completion when positional arguments are already p... (diff)
downloadzsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar
zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.gz
zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.bz2
zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.lz
zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.xz
zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.zst
zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.zip
47561 (the git and cvs parts) (compare 44919 + 44920): vcs_info internals: cvs, git: Set ${vcs_comm[basedir]} like all other backends do.
That doesn't affect anything, not even other vcs_info internals; it's just for consistency across backends.
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_detect_git')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_detect_git1
1 files changed, 1 insertions, 0 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_git b/Functions/VCS_Info/Backends/VCS_INFO_detect_git
index e4191f474..b7955de38 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_detect_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_git
@@ -7,6 +7,7 @@ setopt localoptions NO_shwordsplit
[[ $1 == '--flavours' ]] && { print -l git-p4 git-svn; return 0 }
if VCS_INFO_check_com ${vcs_comm[cmd]} && vcs_comm[gitdir]="$(${vcs_comm[cmd]} rev-parse --git-dir 2> /dev/null)" ; then
+ vcs_comm[basedir]="$( ${vcs_comm[cmd]} rev-parse --show-toplevel 2> /dev/null )"
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