Re: [PATCH] config: option transfer.ipversion to set transport protocol version for network fetches
- From
Alex Riesen <alexander.riesen@cetitec.com>
- Date
- Sep 21, 2020, 16:39 UTC
- Message-ID
- <20200921163901.GB4541@pflmari>
- In-Reply-To
- <xmqq363fnir9.fsf@gitster.c.googlers.com>
Junio C Hamano, Fri, Sep 18, 2020 18:37:30 +0200:
Show 21 quoted lines
> Alex Riesen <alexander.riesen@cetitec.com> writes: > > > git fetch --ipversions=ipv6,ipv8 > > > > Given multiple times, the last option wins, as usual: > > Just a clarification on "the last option wins". > > You do not mean "I said v6 earlier but no, I want v8", with the > above. What you mean is that > > > > > $ cat my-fetch > > #!/bin/sh > > git fetch --ipversions=ipv4 "$@" > > > > $ ./my-fetch --ipversions=all > > the argument given to 'my-fetch' overrides what is hardcoded in > 'my-fetch', i.e. "I said v4, but I take it back; I want to accept > any".
Absolutely correct.
> I find the above sensible.
... And is precisely my intention.
Show 7 quoted lines
> > BTW, transport.c already converts transport->family to bit-flags in > > connect_setup. > > Yes, that is why I suggested the "list of acceptable choices" > approach as a direction to go in the future, primarily to limit the > scope of this current work. I do not mind it if you want to bite > the whole piece right now, though.
I shall try, I think.
> By the way, I have a mild preference to call the option after the > phrase "protocol-family", without "IP", so that we won't be limited > to Internet protocols. IOW, --ipversions is a bad name for the new > commnad line option in my mind.
I have nothing against protocol-family, with or without "transport-". I just didn't want to ... over-generalize it prematurely: currently, the transport family is very fixed on IP on many levels.
Show 8 quoted lines
> As I said elsewhere, I also think TRANSPORT_FAMILY_ALL is a > misnomer. When it is specified, we don't use all the available ones > at the same time. What it says is that we accept use of any > protocol families that are supported. It is OK to use ALL in the > CPP macro as it is merely an internal implementation detail, but if > we are going to expose it to end users as one of the choices, I'd > prefer to use 'any', and not 'all', as the value for the new command > line option.
Noted.
Regards, Alex