From: Johannes Sixt <j6t@kdbg.org>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: git@vger.kernel.org
Subject: Re: [Updated PATCH 2/2] Improve transport helper exec failure reporting
Date: Thu, 31 Dec 2009 16:44:37 +0100 [thread overview]
Message-ID: <4B3CC6E5.7090404@kdbg.org> (raw)
In-Reply-To: <1262170338-11574-3-git-send-email-ilari.liusvaara@elisanet.fi>
Ilari Liusvaara schrieb:
> @@ -31,13 +31,19 @@ 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] = transport->url;
> - helper->git_cmd = 1;
> - if (start_command(helper))
> - die("Unable to run helper: git %s", helper->argv[0]);
> + helper->git_cmd = 0;
> + if (start_command(helper)) {
> + if (errno == ENOENT)
> + die("Unable to find remote helper for \"%s\"",
> + data->name);
You should set helper->silent_exec_failure = 1 when you give your own
error message for the ENOENT case.
BTW, which error message do you see without your change in this case? You
only say "pretty much useless", but do not give an example.
> + else
> + die("Unable to run helper %s: %s", helper->argv[0],
> + strerror(errno));
You shouldn't write an error message here because start_command has
already reported the error.
-- Hannes
next prev parent reply other threads:[~2009-12-31 15:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-30 10:52 [Updated PATCH 0/2] Improve remote helpers exec error reporting Ilari Liusvaara
2009-12-30 10:52 ` [Updated PATCH 1/2] Report exec errors from run-command Ilari Liusvaara
2009-12-30 13:47 ` Erik Faye-Lund
2009-12-31 5:26 ` Tarmigan
2009-12-31 10:48 ` Ilari Liusvaara
2009-12-31 14:44 ` Tarmigan
2009-12-30 10:52 ` [Updated PATCH 2/2] Improve transport helper exec failure reporting Ilari Liusvaara
2009-12-31 15:44 ` Johannes Sixt [this message]
2009-12-31 16:59 ` Ilari Liusvaara
2009-12-31 17:48 ` Johannes Sixt
2009-12-31 18:24 ` Ilari Liusvaara
2009-12-31 18:44 ` Johannes Sixt
2010-01-01 0:34 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B3CC6E5.7090404@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=ilari.liusvaara@elisanet.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).