Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-07-19 00:45:59 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-19 00:47:30 +0300
commita2dad4868bf0681f63fe10264c171b5a547324a5 (patch)
tree9c32b007da84ebd4255cecdbaf7f0267c14b5995 /parse-options.h
parentae2c912c04cf9902653409d686ca6d5017c3906f (diff)
fetch: reject --no-ipv[46]
Now we have introduced OPT_IPVERSION(), tweak its implementation so that "git clone", "git fetch", and "git push" reject the negated form of "Use only IP version N" options. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse-options.h b/parse-options.h
index e35710733d..57a7fe9d91 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -582,9 +582,9 @@ int parse_opt_tracking_mode(const struct option *, const char *, int);
#define OPT_AUTOSTASH(v) OPT_BOOL(0, "autostash", v, N_("automatically stash/stash pop before and after"))
#define OPT_IPVERSION(v) \
- OPT_SET_INT('4', "ipv4", (v), N_("use IPv4 addresses only"), \
- TRANSPORT_FAMILY_IPV4), \
- OPT_SET_INT('6', "ipv6", (v), N_("use IPv6 addresses only"), \
- TRANSPORT_FAMILY_IPV6)
+ OPT_SET_INT_F('4', "ipv4", (v), N_("use IPv4 addresses only"), \
+ TRANSPORT_FAMILY_IPV4, PARSE_OPT_NONEG), \
+ OPT_SET_INT_F('6', "ipv6", (v), N_("use IPv6 addresses only"), \
+ TRANSPORT_FAMILY_IPV6, PARSE_OPT_NONEG)
#endif