Re: [PATCH] setup: support GIT_IGNORE_INSECURE_OWNER environment variable
- From
Jeff King <peff@peff.net>
- Date
- Jul 1, 2024, 18:19 UTC
- Message-ID
- <20240701181916.GD3199@coredump.intra.peff.net>
- In-Reply-To
- <ae658244-877f-c5cf-8947-83b87b66d01f@gmx.de>
On Mon, Jul 01, 2024 at 06:34:10PM +0200, Johannes Schindelin wrote:
Show 14 quoted lines
> The `local_repo_env` array _specifically_ lists `GIT_CONFIG_PARAMETERS` in > https://github.com/git/git/blob/v2.45.2/environment.c#L129 to be removed > from the environment when spawning the `git upload-pack` process. > > It was not originally listed, but added via > https://lore.kernel.org/git/20100824064114.GA20724@burratino/, where the > commit message does not really shed light into the question why this was > desirable, and there is no discussion in that mail thread about this > aspect of the patch, but at least the added test case reveals the > intention in some sort of way: The `-c` option allows to specify > `receive.denyDeletes`, and in the described scenario the idea was that it > would only apply to the client side of a local `receive-pack` but not the > "remote" one. As the example above illustrates, that patch might have > been overly focused on one specific, particular scenario.
One reason we haven't loosened local_repo_env for the local transport is that it would make it inconsistent with all of the other transports. I.e., "git -c foo.bar=baz fetch" would still be ignored over ssh, https, and so on, because those transports don't pass environment variables.
There's some more discussion from a similar case that came up a month ago:
https://lore.kernel.org/git/20240529102307.GF1098944@coredump.intra.peff.net/
-Peff