aboutsummaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-07-27 15:26:37 -0700
committerJunio C Hamano <gitster@pobox.com>2023-07-27 15:26:37 -0700
commit9562f19026f1dcdfcfda86c2c9b7cff21c8b0642 (patch)
tree37fe37bad4646cadfdda68b22a4ec8ee1288cbcd /builtin/fetch.c
parent7fb1483c27f367e5654e6f23586de58a30be6025 (diff)
parenta2dad4868bf0681f63fe10264c171b5a547324a5 (diff)
downloadgit-9562f19026f1dcdfcfda86c2c9b7cff21c8b0642.tar.xz
Merge branch 'jc/transport-parseopt-fix'
Command line parser fixes. * jc/transport-parseopt-fix: fetch: reject --no-ipv[46] parse-options: introduce OPT_IPVERSION()
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index a01ecad574..eed4a7cdb6 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -2207,10 +2207,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
OPT_CALLBACK_F(0, "refmap", NULL, N_("refmap"),
N_("specify fetch refmap"), PARSE_OPT_NONEG, parse_refmap_arg),
OPT_STRING_LIST('o', "server-option", &server_options, N_("server-specific"), N_("option to transmit")),
- OPT_SET_INT('4', "ipv4", &family, N_("use IPv4 addresses only"),
- TRANSPORT_FAMILY_IPV4),
- OPT_SET_INT('6', "ipv6", &family, N_("use IPv6 addresses only"),
- TRANSPORT_FAMILY_IPV6),
+ OPT_IPVERSION(&family),
OPT_STRING_LIST(0, "negotiation-tip", &negotiation_tip, N_("revision"),
N_("report that we have only objects reachable from this object")),
OPT_BOOL(0, "negotiate-only", &negotiate_only,