aboutsummaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-20 14:44:12 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-20 14:44:12 -0800
commit030b1a77f72a7e3307c7d7881ae570ca1c8ed877 (patch)
tree1c25e1ee45851d02c59bb5e420fd39f4c51520f6 /transport-helper.c
parent3af59e6f31c5304d476884b69b6b88dfd492812b (diff)
parent6b02de3b9dc4ac8374cea4964e993ec6636d781c (diff)
downloadgit-030b1a77f72a7e3307c7d7881ae570ca1c8ed877.tar.gz
git-030b1a77f72a7e3307c7d7881ae570ca1c8ed877.tar.xz
Merge branch 'js/exec-error-report'
* js/exec-error-report: Improve error message when a transport helper was not found start_command: detect execvp failures early run-command: move wait_or_whine earlier start_command: report child process setup errors to the parent's stderr Conflicts: Makefile
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/transport-helper.c b/transport-helper.c
index fdf225622..107742891 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -102,6 +102,7 @@ static struct child_process *get_helper(struct transport *transport)
int refspec_nr = 0;
int refspec_alloc = 0;
int duped;
+ int code;
if (data->helper)
return data->helper;
@@ -111,13 +112,18 @@ static struct child_process *get_helper(struct transport *transport)
helper->out = -1;
helper->err = 0;
helper->argv = xcalloc(4, sizeof(*helper->argv));
- strbuf_addf(&buf, "remote-%s", data->name);
+ strbuf_addf(&buf, "git-remote-%s", data->name);
helper->argv[0] = strbuf_detach(&buf, NULL);
helper->argv[1] = transport->remote->name;
helper->argv[2] = remove_ext_force(transport->url);
- helper->git_cmd = 1;
- if (start_command(helper))
- die("Unable to run helper: git %s", helper->argv[0]);
+ helper->git_cmd = 0;
+ helper->silent_exec_failure = 1;
+ code = start_command(helper);
+ if (code < 0 && errno == ENOENT)
+ die("Unable to find remote helper for '%s'", data->name);
+ else if (code != 0)
+ exit(code);
+
data->helper = helper;
data->no_disconnect_req = 0;