From: Jeff King <peff@peff.net>
To: Eric Wong <normalperson@yhbt.net>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
"Junio C Hamano" <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: [PATCH 2/1] support -4 and -6 switches for remote operations
Date: Sat, 30 Jan 2016 20:13:14 -0500 [thread overview]
Message-ID: <20160131011314.GA22855@sigill.intra.peff.net> (raw)
In-Reply-To: <20160131000144.GA10117@dcvr.yhbt.net>
On Sun, Jan 31, 2016 at 12:01:44AM +0000, Eric Wong wrote:
> > > --- a/builtin/clone.c
> > > +++ b/builtin/clone.c
> > > @@ -47,6 +47,7 @@ static const char *real_git_dir;
> > > static char *option_upload_pack = "git-upload-pack";
> > > static int option_verbosity;
> > > static int option_progress = -1;
> > > +static int ipv4, ipv6;
> > Do we need 2 variables here ?
>
> Yes, I'm not sure how else to use OPT_BOOL below...
If they're mutually exclusive, and saying "-6" cancels "-4", you
probably want something like:
enum {
USE_NET_ALL = 0,
USE_NET_IPV4,
USE_NET_IPV6,
} use_net;
...
OPT_SET_INT('4', "ipv4", &use_net,
N_("resolve IPv4 addresses only"), USE_NET_IPV4),
OPT_SET_INT('6', "ipv6", &use_net,
N_("resolve IPv6 addresses only"), USE_NET_IPV6),
Using --no-ipv4 will set it back to USE_NET_ALL, which is probably OK.
It will cancel a previous "--ipv4", which is logically consistent,
though I guess some people might assume that "--no-ipv4" means "do not
use ipv4 addresses". Supporting that would be more complicated.
-Peff
next prev parent reply other threads:[~2016-01-31 1:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 22:51 [PATCH] pass transport verbosity down to git_connect Eric Wong
2016-01-28 23:45 ` Junio C Hamano
2016-01-30 8:50 ` [PATCH v2] " Eric Wong
2016-01-30 13:13 ` [PATCH 2/1] support -4 and -6 switches for remote operations Eric Wong
2016-01-30 13:28 ` Eric Wong
2016-01-30 23:34 ` Torsten Bögershausen
2016-01-31 0:01 ` Eric Wong
2016-01-31 1:13 ` Jeff King [this message]
2016-02-03 4:09 ` [PATCH v2 " Eric Wong
2016-02-12 11:31 ` Eric Wong
2016-02-12 15:43 ` Torsten Bögershausen
2016-01-31 16:03 ` [PATCH " Torsten Bögershausen
2016-01-28 23:53 ` [PATCH] pass transport verbosity down to git_connect Jeff King
2016-01-29 0:38 ` Eric Wong
2016-01-29 3:19 ` Junio C Hamano
2016-01-29 3:47 ` Jeff King
2016-01-29 17:34 ` Junio C Hamano
2016-01-29 17:41 ` Jeff King
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=20160131011314.GA22855@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=normalperson@yhbt.net \
--cc=tboegi@web.de \
/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).