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

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

From
Junio C Hamano <junkio@cox.net>
Date
Feb 26, 2006, 23:10 UTC
Message-ID
<7vbqwt7m3t.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0602261225500.22647@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 8 quoted lines
> This also implies that to support the old "git-log" and "git-diff" syntax, 
> the "git" wrapper now automatically looks at the name it was executed as, 
> and if it is "git-xxxx", it will assume that it is to internally do what 
> "git xxxx" would do.
>
> In other words, you can (once you implement an internal command) soft- or 
> hard-link that command to the "git" wrapper command, and it will do the 
> right thing, whether you use the "git xxxx" or the "git-xxxx" format.
I like this careful backward compatibility part.
> 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.
Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 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.