git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 2/2] Improve transport helper exec failure reporting

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Dec 25, 2009, 09:32 UTC
Message-ID
<20091225093220.GA8319@Knoppix>
In-Reply-To
<7vljgrebv2.fsf@alter.siamese.dyndns.org>
On Thu, Dec 24, 2009 at 11:44:49PM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:
> 
> Looks pretty straightforward, except that I have this nagging feeling that
> we should *not* be married to the idea of "'proc->git_cmd = 1' is merely a
> way to save you from typing 'git-' prefix in start_command(proc)".

That is already broken. If nothing previous broke it, then 1/2 of this series did.

The immediate executable to run for 'git-foo' && git_cmd = 0: 'git-foo'. The immediate executable to run for 'foo' && git_cmd = 1: 'git'(!).

And one wants exec status for 'git-remote-foo', NOT for 'git'. Thus,
git_cmd must be 0 (at least without additional flags or flag values).
 
> For example, we might later want to use different $PATH only when running
> a git subcommand, and telling run_command() explicitly that we are running
> a git thing would help if you don't add "git-" to the command line and
> drop "proc->git_cmd = 1" in the caller like your patch does.

Well, that would require new flag (or git_cmd field value) to mean do direct exec with gitexecdir in $PATH. Otherwise, you would either break this piece of code, or it would be already broken (depending on value of git_cmd).

-Ilari
Previous: Junio C Hamano
Message 11 of 11 in “Report remote helper exec failures”
  1. 0/2 Report remote helper exec failuresIlari Liusvaara, Dec 24, 2009
  2. 1/2 Report exec errors from run-commandIlari Liusvaara, Dec 24, 2009
  3. Junio C HamanoDec 25, 2009
  4. Junio C HamanoDec 25, 2009
  5. Junio C HamanoDec 25, 2009
  6. Ilari LiusvaaraDec 25, 2009
  7. Johannes SixtDec 25, 2009
  8. Ilari LiusvaaraDec 25, 2009
  9. 2/2 Improve transport helper exec failure reportingIlari Liusvaara, Dec 24, 2009
  10. Junio C HamanoDec 25, 2009
  11. Ilari LiusvaaraDec 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.