summaryrefslogtreecommitdiff
path: root/builtin/push.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-24 13:25:54 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-24 13:25:54 -0800
commite84d5e9fa178a027b1c8b9f6e22c9173dcda03b3 (patch)
treeb3d16c3076cb8bce048c54e331e86f56e0c0533b /builtin/push.c
parent8020803f5057601c1c29ffcdbd309905bd26eef7 (diff)
parentc915f11eb4922e154e29cf62d3b549d65c06a170 (diff)
downloadgit-e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3.tar.gz
Merge branch 'ew/force-ipv4'
"git fetch" and friends that make network connections can now be told to only use ipv4 (or ipv6). * ew/force-ipv4: connect & http: support -4 and -6 switches for remote operations
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/push.c b/builtin/push.c
index 960ffc31e1..6e13b3c90a 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -23,6 +23,7 @@ static const char *receivepack;
static int verbosity;
static int progress = -1;
static int recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
+static enum transport_family family;
static struct push_cas_option cas;
@@ -346,6 +347,7 @@ static int push_with_options(struct transport *transport, int flags)
unsigned int reject_reasons;
transport_set_verbosity(transport, verbosity, progress);
+ transport->family = family;
if (receivepack)
transport_set_option(transport,
@@ -565,6 +567,10 @@ int cmd_push(int argc, const char **argv, const char *prefix)
0, "signed", &push_cert, "yes|no|if-asked", N_("GPG sign the push"),
PARSE_OPT_OPTARG, option_parse_push_signed },
OPT_BIT(0, "atomic", &flags, N_("request atomic transaction on remote side"), TRANSPORT_PUSH_ATOMIC),
+ 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_END()
};