zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Aleksandr Mezin <mezin.alexander@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH v4] vcs_info: choose backend by basedir
Date: Mon, 29 Mar 2021 16:04:16 +0000	[thread overview]
Message-ID: <20210329160416.GU18178@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2021-03-29 16:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 19:37 Aleksandr Mezin
2020-12-03  4:01 ` Aleksandr Mezin
2020-12-04 15:56   ` Daniel Shahaf
2021-03-27 20:40     ` Lawrence Velázquez
2021-03-29 16:04 ` Daniel Shahaf [this message]
2021-03-29 16:56 ` Daniel Shahaf
2021-04-10 20:49   ` Lawrence Velázquez
2021-04-17 12:17   ` Aleksandr Mezin
2021-04-17 13:16     ` Daniel Shahaf
2021-05-09 20:28       ` Lawrence Velázquez
2021-05-31  1:13         ` Lawrence Velázquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210329160416.GU18178@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=mezin.alexander@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).