Re: Teach the "git" command to handle some commands internally
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.