From fc82e8193bad79db5de9e40ec99814fe401ad876 Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Mon, 29 Mar 2021 15:53:44 +0000 Subject: 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. --- Functions/VCS_Info/Backends/VCS_INFO_detect_git | 1 + 1 file changed, 1 insertion(+) (limited to 'Functions/VCS_Info/Backends/VCS_INFO_detect_git') 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 -- cgit v1.2.3-70-g09d2