From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>,
Andreas Ericsson <exon@op5.se>, Alex Riesen <raa.lkml@gmail.com>,
Michal Ostrowski <mostrows@watson.ibm.com>
Subject: Re: Teach the "git" command to handle some commands internally
Date: Sun, 26 Feb 2006 15:22:42 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602261518110.22647@g5.osdl.org> (raw)
In-Reply-To: <7vbqwt7m3t.fsf@assigned-by-dhcp.cox.net>
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.
IOW, you can do things like
alias git=/opt/my-git/git
and all the "git" commands will automatically work fine, even if you
didn't know at compile time where you would install them, and you didn't
set GIT_EXEC_DIR at run-time. It will still first look in GIT_EXEC_DIR,
but if that fails, it will take the git commands from /opt/my-git/ instead
of from /usr/bin or whatever.
It seemed a nice thing to try to make the git wrapper execute whatever git
version it was installed with, rather than depend on PATH.
But hey, it's only a couple of lines out of the whole thing, so you can
certainly skip it (remove the
if (exec_path)
prepend_path(exec_path)
lines to disable it).
Linus
next prev parent reply other threads:[~2006-02-26 23:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-26 20:34 Teach the "git" command to handle some commands internally Linus Torvalds
2006-02-26 23:10 ` Junio C Hamano
2006-02-26 23:22 ` Linus Torvalds [this message]
2006-02-26 23:46 ` Junio C Hamano
2006-02-27 12:59 ` Michal Ostrowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0602261518110.22647@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=exon@op5.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=mostrows@watson.ibm.com \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).