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

Re: [Fundamental problem with relative system paths] [PATCH 2/2] run-command (Windows): Run dashless "git <cmd>"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 28, 2008, 11:13 UTC
Message-ID
<alpine.DEB.1.00.0807281310170.2725@eeepc-johanness>
In-Reply-To
<1217224228-31303-2-git-send-email-prohaska@zib.de>
Hi,
On Mon, 28 Jul 2008, Steffen Prohaska wrote:
Show 8 quoted lines
> This might solve a fundamental problem we have with the computation of 
> system directories based on relative paths in combination with the new 
> gitexecpath 'libexec/git-core'. The problem is that the program 'git' is 
> hardlinked to directories with different depth.  It is either used as 
> 'bin/git' (1 directory) or as 'libexec/git-core/git-*' (2 directories).  
> Thus, using the same relative path in system_path() yields different 
> results when starting from the two locations.  I recognized the problem 
> because /etc/gitconfig is no longer be read.

I seem to recall that I already suggested stripping "/libexec/git-core/<name>" if it is found, and fall back to stripping one directory level (catching "/bin/<name>").

IMHO system_path() should really be that intelligent.

(Of course, the way it is set up now, the _caller_ of git_set_argv0_path() has to do the intelligent thing...)

Ciao, Dscho

Previous: Junio C HamanoNext: Johannes Sixt
Message 5 of 11 in “Refactor, adding prepare_git_cmd(const char **argv)”
  1. 1/2 Refactor, adding prepare_git_cmd(const char **argv)Steffen Prohaska, Jul 28, 2008
  2. [Fundamental problem with relative system paths] [PATCH 2/2] run-command (Windows): Run dashless "git <cmd>"Steffen Prohaska, Jul 28, 2008
  3. Junio C HamanoJul 28, 2008
  4. Junio C HamanoJul 28, 2008
  5. Johannes SchindelinJul 28, 2008
  6. Johannes SixtJul 28, 2008
  7. Steffen ProhaskaJul 29, 2008
  8. 2/2 run-command (Windows): Run dashless "git <cmd>" (solves part of problem with system_path)Steffen Prohaska, Jul 29, 2008
  9. [FOR DEBUGGING] Stop installing BUILT_INSSteffen Prohaska, Jul 29, 2008
  10. Junio C HamanoJul 29, 2008
  11. Johannes SixtJul 29, 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.