git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Forney <mforney@mforney.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Drop some dashes from built-in invocations in scripts
Date: Sat, 5 Aug 2017 22:35:47 -0700	[thread overview]
Message-ID: <CAGw6cBsYiGH1h8C8qFp-yX3arzkaRi_vghpjbErxjoYHXxpu+Q@mail.gmail.com> (raw)
In-Reply-To: <xmqqh8xlsiaq.fsf@gitster.mtv.corp.google.com>

On 8/5/17, Junio C Hamano <gitster@pobox.com> wrote:
> Michael Forney <mforney@mforney.org> writes:
>> On 8/5/17, Junio C Hamano <gitster@pobox.com> wrote:
>>> Have you made sure that all of these scripts, before calling
>>> 'git-foo' in the current code, update their PATH so that these found
>>> in the bog standard place (i.e. GIT_EXEC_PATH)?
>>>
>>> The reason I ask is because we can rest assured these changes will
>>> be a no-regression improvement if you did so.  I do not offhand
>>> think of a reason why these scripts wouldn't be doing so, but it
>>> never hurts to make sure.
>>
>> I just checked and all the scripts make some other call to a built-in
>> with `git foo`, so I think it should be safe.
>
> As long as they are the same "foo"'s, then the check you did is
> perfectly fine.  The (unlikely I would think) case that can lead to
> a regression is if these script deliberately used `git-foo` to find
> them on $PATH, which can be different from 'git foo' that is found
> by 'git' in its own binary (as all of them are built-ins), and that
> is why I asked.

Ah. Well, it looks like all but git-merge-resolve.sh run `.
git-sh-setup`, so we know that GIT_EXEC_PATH must in their PATH (and
at the front unless the script was invoked directly).

git-merge-resolve.sh does not do this, so I suppose if the user ran
$GIT_EXEC_PATH/git-merge-resolve directly, and also had a custom
git-merge-index executable in their PATH, that would switch to running
the git merge-index built-in instead.

  reply	other threads:[~2017-08-06  5:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-05  6:49 [PATCH] Drop some dashes from built-in invocations in scripts Michael Forney
2017-08-05 22:15 ` Johannes Schindelin
2017-08-05 22:41 ` Junio C Hamano
2017-08-05 22:54   ` Michael Forney
2017-08-05 23:31     ` Junio C Hamano
2017-08-06  5:35       ` Michael Forney [this message]
2017-08-07  1:31         ` Junio C Hamano
2017-08-05 23:30   ` Johannes Schindelin
2017-08-07 16:35 ` Junio C Hamano
2017-08-07 17:12   ` Junio C Hamano
2017-08-07 17:58     ` Michael Forney
2017-08-07 18:18       ` Junio C Hamano
2017-08-07 19:22   ` Johannes Schindelin
2017-08-07 19:48     ` Junio C Hamano
2017-08-07 21:07   ` Johannes Schindelin
2017-08-07 21:47     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAGw6cBsYiGH1h8C8qFp-yX3arzkaRi_vghpjbErxjoYHXxpu+Q@mail.gmail.com \
    --to=mforney@mforney.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).