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

Re: Teach the "git" command to handle some commands internally

From
MOMichal Ostrowski <mostrows@watson.ibm.com>
Date
Feb 27, 2006, 12:59 UTC
Message-ID
<1141045198.19983.9.camel@brick.watson.ibm.com>
In-Reply-To
<7vy7zx65v0.fsf@assigned-by-dhcp.cox.net>
On Sun, 2006-02-26 at 15:46 -0800, Junio C Hamano wrote:
Show 21 quoted lines
> Linus Torvalds <torvalds@osdl.org> writes:
> 
> > On Sun, 26 Feb 2006, Junio C Hamano wrote:
> >> 
> >> > There's one other change: the search order for external programs is 
> >> > modified slightly, so that the first entry remains GIT_EXEC_DIR, but the 
> >> > second entry is the same directory as the git wrapper itself was executed 
> >> > out of - if we can figure it out from argv[0], of course.
> >> 
> >> I am not sure about this part, though.
> >
> > Well, what it means is that _if_ you install all your "git" binaries in 
> > some directory that is not in your patch and is not GIT_EXEC_DIR, they 
> > will still magically work, assuming you don't do something strange.
> 
> I understood that part.  I was wondering if this change defeats
> what Michal (you sensibly CC'ed your message to) wanted to do
> earlier, going great length trying to avoid mucking with PATH
> and "where-ever git itself is found" in the last round.  After
> reviewing the change in 77cb17 commit, I realize my worry was
> unfounded.

The changes seem reasonable for now. We can't avoid mucking with PATH as long as we are going to be running shell scripts that depend on PATH to invoke "git-xxx" or even "git xxx". I don't seen any easy solution to this that would not involve changing every script (albeit mechanically) and would not be prone to lapses in discipline.

Any solution to this original problem (i.e. a special "PATH" for "git*") would seem to be applicable to the behavior this patch introduces.

-- 
Michal Ostrowski <mostrows@watson.ibm.com>
Previous: Junio C Hamano
Message 5 of 5 in “Teach the "git" command to handle some commands internally”
  1. Linus TorvaldsFeb 26, 2006
  2. Junio C HamanoFeb 26, 2006
  3. Linus TorvaldsFeb 26, 2006
  4. Junio C HamanoFeb 26, 2006
  5. Michal OstrowskiFeb 27, 2006

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.