Re: [RFC PATCH] fetch: stop emitting duplicate transfer.credentialsInUrl=warn warnings
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Nov 1, 2022, 01:06 UTC
- Message-ID
- <Y2BxFxZqA9GA40AB@nand.local>
- In-Reply-To
- <RFC-patch-1.1-0266485bc6c-20221031T204149Z-avarab@gmail.com>
On Mon, Oct 31, 2022 at 09:47:08PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 18 quoted lines
> Improve on 6dcbdc0d661 (remote: create fetch.credentialsInUrl config, > 2022-06-06) by fixing the cases where we emit duplicate warnings, > which were: > > * In the same process, as we'd get the same "struct remote *" > again. We could probably save ourselves more work in those scenarios, > but adding a flag to the "struct remote" indicating that we've validated > the URLs will fix those issues. > > * When we invoke e.g. "git-remote-https" (aka. "git-remote-curl") > from "git fetch". For those cases let's pass down the equivalent of a > "-c transfer.credentialsInUrl=allow", since we know that we've already > inspected our remotes in the parent process. > > See 7390f05a3c6 (fetch: after refetch, encourage auto gc repacking, > 2022-03-28) for prior use of git_config_push_parameter() for this > purpose, i.e. to push config parameters before invoking a > sub-process.
Both make sense. I was skimming the diff before I read the patch message here and was scratching my head at the calls to git_config_push_parameter().
But for crossing process boundaries, that makes sense.
Thanks, Taylor