summaryrefslogtreecommitdiff
path: root/connected.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-07-15 10:32:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-20 19:11:01 (GMT)
commite0331849a081fe4919f4130540165ce7d7355748 (patch)
tree6c137f62c906f641c7717bc3cf09791925152985 /connected.h
parent7043c7071cdbdef60ce8413f425da622b8e6dc85 (diff)
downloadgit-e0331849a081fe4919f4130540165ce7d7355748.zip
git-e0331849a081fe4919f4130540165ce7d7355748.tar.gz
git-e0331849a081fe4919f4130540165ce7d7355748.tar.bz2
check_connected: relay errors to alternate descriptor
Unless the "quiet" flag is given, check_connected sends any errors to the stderr of the caller (because the child rev-list inherits that descriptor). However, server-side callers may want to send these over a sideband channel instead. Let's make that possible. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connected.h')
-rw-r--r--connected.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/connected.h b/connected.h
index 12594ef..5d88e26 100644
--- a/connected.h
+++ b/connected.h
@@ -23,6 +23,13 @@ struct check_connected_options {
/* Transport whose objects we are checking, if available. */
struct transport *transport;
+
+ /*
+ * If non-zero, send error messages to this descriptor rather
+ * than stderr. The descriptor is closed before check_connected
+ * returns.
+ */
+ int err_fd;
};
#define CHECK_CONNECTED_INIT { 0 }