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

Re: [PATCH] help git-upload-pack find git

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 16, 2008, 15:38 UTC
Message-ID
<48CFD30E.7030206@drmicha.warpmail.net>
In-Reply-To
<48CFB81A.5060108@viscovery.net>
Johannes Sixt venit, vidit, dixit 16.09.2008 15:43:
Show 16 quoted lines
> Michael J Gruber schrieb:
>> Why is it that setup_path() cannot be done before commit_pager_choice()?
>> We need the pager in case list_common_cmds_help() is triggered, but why
>> can't setup_path() be before that? Not because of "--", really.
> 
> I think that setup_path() must be called *after* handle_options() because
> of this use-case:
> 
>   $ git --exec-path=/some/where foo
> 
> and git_set_argv0_path() must be called *before* handle_options() because
> of this use-case:
> 
>   $ git --exec-path
> 
> -- Hannes

Tricky, I see. But still I'm getting more and more confused: handle_options() calls git_exec_path() in this case, which does (unless there is argv_exec_path or the variable): return system_path(GIT_EXEC_PATH) Duh, that comes from the Makefile, -DGIT_EXEC_PATH... Back to somewhat less confused state.

OK, now how about
A: path as submitted
or
B: leave git.c as is, except that setup_path(NULL) is used; have
setup_path(argv0path) call git_set_argv0_path() unless the arg is NULL;
tell upload-pack etc. to stuff (other setup_path() callers) their
argv[0] into setup_path(). Junio, is that what you meant?
Michael
Previous: Johannes SixtNext: Michael J Gruber
Message 9 of 11 in “git-clone: path or ssh problem with git-upload-pack in 1.6.0?”
  1. Paul JohnstonSep 10, 2008
  2. Paul JohnstonSep 15, 2008
  3. help git-upload-pack find gitMichael J Gruber, Sep 15, 2008
  4. Junio C HamanoSep 15, 2008
  5. Michael J GruberSep 15, 2008
  6. Johannes SixtSep 16, 2008
  7. Michael J GruberSep 16, 2008
  8. Johannes SixtSep 16, 2008
  9. Michael J GruberSep 16, 2008
  10. Michael J GruberSep 15, 2008
  11. Michael WookeySep 15, 2008

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.