summaryrefslogtreecommitdiff
path: root/connect.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2016-02-03 04:09:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-12 19:34:14 (GMT)
commitc915f11eb4922e154e29cf62d3b549d65c06a170 (patch)
treec318d28aff355a3a42a6b7accc3fa0e71588584d /connect.h
parentf3ee9ca53bc04e9770747ea58951135d60b11a8d (diff)
downloadgit-c915f11eb4922e154e29cf62d3b549d65c06a170.zip
git-c915f11eb4922e154e29cf62d3b549d65c06a170.tar.gz
git-c915f11eb4922e154e29cf62d3b549d65c06a170.tar.bz2
connect & http: support -4 and -6 switches for remote operations
Sometimes it is necessary to force IPv4-only or IPv6-only operation on networks where name lookups may return a non-routable address and stall remote operations. The ssh(1) command has an equivalent switches which we may pass when we run them. There may be old ssh(1) implementations out there which do not support these switches; they should report the appropriate error in that case. rsync support is untouched for now since it is deprecated and scheduled to be removed. Signed-off-by: Eric Wong <normalperson@yhbt.net> Reviewed-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connect.h')
-rw-r--r--connect.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/connect.h b/connect.h
index c41a685..01f14cd 100644
--- a/connect.h
+++ b/connect.h
@@ -3,6 +3,8 @@
#define CONNECT_VERBOSE (1u << 0)
#define CONNECT_DIAG_URL (1u << 1)
+#define CONNECT_IPV4 (1u << 2)
+#define CONNECT_IPV6 (1u << 3)
extern struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
extern int finish_connect(struct child_process *conn);
extern int git_connection_is_socket(struct child_process *conn);