Re: [RFC PATCH 0/3] git-p4: move to toplevel
- From
- Pete Wyckoff <pw@padd.com>
- Date
- Feb 13, 2012, 23:32 UTC
- Message-ID
- <20120213233245.GA29582@padd.com>
- In-Reply-To
- <7vhayuctwm.fsf@alter.siamese.dyndns.org>
gitster@pobox.com wrote on Mon, 13 Feb 2012 13:20 -0800:
Show 24 quoted lines
> Clemens Buchacher <drizzd@aon.at> writes: > > >> Erm,... do you really need the alias if you add git-p4 in a directory on > >> your $PATH? > > > > With recent git versions, this has stopped working. > > Erm, I am confused. > > $ git --exec-path > /home/junio/g/Debian-6.X-x86_64/git-jch/libexec/git-core > $ type git-hello > bash: type: git-hello: not found > $ cat >~/bin/common/git-hello <<EOF > #!/bin/sh > echo hello world > EOF > $ chmod +x ~/bin/common/git-hello > $ type git-hello > git-hello is /home/junio/bin/common/git-hello > $ git hello > hello world > > What am I missing???
Neat. I never knew this worked. That lets me remove quite a few aliases. Apparently this has been possible since the conversion from git.sh to git.c.
I tried to find where in the documentation this is talked about, or where it should go. This doesn't feel like the best spot, though.
------------8<-----------
>From 574669898aa891ffe3e785b280ac36177116658e Mon Sep 17 00:00:00 2001
From: Pete Wyckoff <pw@padd.com> Date: Mon, 13 Feb 2012 18:17:10 -0500 Subject: [PATCH] document git-<command> can be found in PATH
Explain up front to users that arbitrary git "commands" can be found anywhere in the PATH. For example, ~/bin/git-hello will be invoked by "git hello". --- Documentation/git.txt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt index f7e201f..0ef7f40 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -30,6 +30,8 @@ introduction. The '<command>' is either a name of a Git command (see below) or an alias as defined in the configuration file (see linkgit:git-config[1]). +A '<command>' can also refer to an executable with the name git-'<command>' +anywhere in your PATH. Formatted and hyperlinked version of the latest git documentation can be viewed at
-- 1.7.9.193.g1d4a5.dirty