From e0331849a081fe4919f4130540165ce7d7355748 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 15 Jul 2016 06:32:03 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- connected.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'connected.h') diff --git a/connected.h b/connected.h index 12594efa16..5d88e26c79 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 } -- cgit v1.2.3