Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH v4] vcs_info: choose backend by basedir
- X-seq: zsh-workers 48328
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Aleksandr Mezin <mezin.alexander@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH v4] vcs_info: choose backend by basedir
- Date: Mon, 29 Mar 2021 16:04:16 +0000
- Archived-at: <https://zsh.org/workers/48328>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-03/20210329160416.GU18178%40tarpaulin.shahaf.local2>
- In-reply-to: <20201114193703.1428617-1-mezin.alexander@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20201114193703.1428617-1-mezin.alexander@gmail.com>
Aleksandr Mezin wrote on Sun, Nov 15, 2020 at 01:37:03 +0600:
> Also, this patch adjusts VCS_INFO_detect_git and VCS_INFO_detect_cvs to make
> them set vcs_comm[basedir], by moving basedir detection code from corresponding
> VCS_INFO_get_data_* functions. VCS_INFO_detect_git and VCS_INFO_detect_cvs were
> the only VCS_INFO_detect_* functions not setting it.
I've committed this part. The code wasn't wrong, but consistency
between backends is a good thing to have.
> +++ 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}
It seems to me this call should be moved below the assignment of rrn, in
case VCS_INFO_detect_git ever wants to query zstyles. (preëxisting issue)
> -gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel 2> /dev/null )
> +gitbase=${vcs_comm[basedir]}
> if [[ -z ${gitbase} ]]; then
> # Bare repository
> gitbase=${gitdir:P}
(Haven't forgotten about the non-drive-by part of the patch, either.)
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author