summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-06-21 07:05:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-21 16:03:53 (GMT)
commit266f1fdfa99f5d29ca7ce455966e7960c00a82e4 (patch)
treeec29377760496c5d48285bda5793841b16a5f0a4 /transport-helper.c
parent21ff9151e811059f5576ca906c519ee5bb5b925e (diff)
downloadgit-266f1fdfa99f5d29ca7ce455966e7960c00a82e4.zip
git-266f1fdfa99f5d29ca7ce455966e7960c00a82e4.tar.gz
git-266f1fdfa99f5d29ca7ce455966e7960c00a82e4.tar.bz2
transport-helper: be quiet on read errors from helpers
Prior to commit 81d340d4, we did not print any error message if a remote transport helper died unexpectedly. If a helper did not print any error message (e.g., because it crashed), the user could be left confused. That commit tried to rectify the situation by printing a note that the helper exited unexpectedly. However, this makes a much more common case worse: when a helper does die with a useful message, we print the extra "Reading from 'git-remote-foo failed" message. This can also end up confusing users, as they may not even know what remote helpers are (e.g., the fact that http support comes through git-remote-https is purely an implementation detail that most users do not know or care about). Since we do not have a good way of knowing whether the helper printed a useful error, and since the common failure mode is for it to do so, let's default to remaining quiet. Debuggers can dig further by setting GIT_TRANSPORT_HELPER_DEBUG. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 06c08a1..db9bd18 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -56,7 +56,7 @@ static int recvline_fh(FILE *helper, struct strbuf *buffer, const char *name)
if (strbuf_getline(buffer, helper, '\n') == EOF) {
if (debug)
fprintf(stderr, "Debug: Remote helper quit.\n");
- die("Reading from helper 'git-remote-%s' failed", name);
+ exit(128);
}
if (debug)