diff options
author | Linus Torvalds <torvalds@osdl.org> | 2006-02-26 12:34:51 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-26 15:10:37 -0800 |
commit | 231af8322ac5313243bc1e8beac8dfd9ff95051d (patch) | |
tree | cea517088cc967aa7e3a16cc4b92655524c63b24 /rsh.c | |
parent | Use setenv(), fix warnings (diff) | |
download | tgif-231af8322ac5313243bc1e8beac8dfd9ff95051d.tar.xz |
Teach the "git" command to handle some commands internally
This is another patch in the "prepare to do more in C" series, where the
git wrapper command is taught about the notion of handling some
functionality internally.
Right now, the only internal commands are "version" and "help", but the
point being that we can now easily extend it to handle some of the trivial
scripts internally. Things like "git log" and "git diff" wouldn't need
separate external scripts any more.
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.
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.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'rsh.c')
0 files changed, 0 insertions, 0 deletions