From: Jeff King <peff@peff.net>
To: Philippe Blain <levraiphilippeblain@gmail.com>
Cc: "Elijah Newren" <newren@gmail.com>,
"Git mailing list" <git@vger.kernel.org>,
"Eric Sunshine" <sunshine@sunshineco.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [BUG?] Weird interaction between `git -C`, aliases and worktrees
Date: Thu, 15 Oct 2020 20:23:54 -0400 [thread overview]
Message-ID: <20201016002354.GA2932796@coredump.intra.peff.net> (raw)
In-Reply-To: <88D2A179-806F-4321-828A-359692E646B1@gmail.com>
On Wed, Oct 14, 2020 at 06:35:39PM -0400, Philippe Blain wrote:
> I found two threads [2] and [3] which are manifestations of similar (or the same ?) problems...
>
> Maybe git-config(1) could document which variables will
> be set in aliases that shell out, but even that might be tricky because it
> seems the answer is "it depends" (according to [2])...
>
> I also found 57ea7123c8 (git.c: make sure we do not
> leak GIT_* to alias scripts, 2015-12-20), in topic 'nd/clear-gitenv-upon-use-of-alias',
> which tries to clear out GIT_* variables from aliases environment,
> which I guess is defeated by the fact that I run `git -C` in my alias...
>
> Anyway thanks for your answer.
>
> [1] https://git-scm.com/docs/git#Documentation/git.txt---git-dirltpathgt
> [2] https://lore.kernel.org/git/20200130102933.GE840531@coredump.intra.peff.net/
> [3] https://lore.kernel.org/git/20200228190218.GC1408759@coredump.intra.peff.net/
IMHO it is still worth doing a fix similar to what I wrote earlier. But
somebody needs to figure out what's up with the failure in t5601:
- whether it's a behavior that has to be kept, or if it's something we can
deprecate or just publicly warn about
- if kept, can we work around it internally within git-clone /
git-init? If not, can we work around it with an extra environment
variable?
I probably won't look at it anytime soon, but I'd be happy if somebody
else did. :)
-Peff
prev parent reply other threads:[~2020-10-16 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 15:27 [BUG?] Weird interaction between `git -C`, aliases and worktrees Philippe Blain
2020-10-14 22:02 ` Elijah Newren
2020-10-14 22:35 ` Philippe Blain
2020-10-16 0:23 ` Jeff King [this message]
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=20201016002354.GA2932796@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=levraiphilippeblain@gmail.com \
--cc=newren@gmail.com \
--cc=pclouds@gmail.com \
--cc=sunshine@sunshineco.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.
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).