Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings
- From
Jeff King <peff@peff.net>
- Date
- Apr 28, 2016, 11:29 UTC
- Message-ID
- <20160428112912.GB11522@sigill.intra.peff.net>
- In-Reply-To
- <89d0024450b0e6e9997ad9e3d681248bde1bafc0.1461837783.git.johannes.schindelin@gmx.de>
On Thu, Apr 28, 2016 at 12:03:47PM +0200, Johannes Schindelin wrote:
Show 15 quoted lines
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
> index 3bd6883..b338f93 100644
> --- a/builtin/submodule--helper.c
> +++ b/builtin/submodule--helper.c
> @@ -127,7 +127,9 @@ static int module_name(int argc, const char **argv, const char *prefix)
> */
> static int submodule_config_ok(const char *var)
> {
> - if (starts_with(var, "credential."))
> + if (starts_with(var, "credential.") ||
> + (starts_with(var, "http.") &&
> + ends_with(var, ".extraheader")))
> return 1;
> return 0;
> }Should we consider just white-listing all of "http.*"?
That would help other cases which have come up, like:
http://thread.gmane.org/gmane.comp.version-control.git/264840
which wants to turn off http.sslverify. That would mean it turns off for every submodule, too, but if you want to be choosy about your http variables, you should be using the "http.$URL.sslverify" form, to only affect specific servers (whether they are in submodules or not).
-Peff