Re: [PATCH] Allow an alias to start with "-p"
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 25, 2006, 06:18 UTC
- Message-ID
- <Pine.LNX.4.63.0607250813450.29667@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <20060725050312.GA5618@coredump.intra.peff.net>
Hi,
On Tue, 25 Jul 2006, Jeff King wrote:
Show 10 quoted lines
> On Mon, Jul 24, 2006 at 02:10:45PM +0200, Johannes Schindelin wrote:
>
> > @@ -264,6 +289,7 @@ int main(int argc, const char **argv, ch
> > if (!strncmp(cmd, "git-", 4)) {
> > cmd += 4;
> > argv[0] = cmd;
> > + handle_alias(&argc, &argv);
> > handle_internal_command(argc, argv, envp);
> > die("cannot handle %s internally", cmd);
> > }My fault. This was a left-over from my original alias patch. (I did a merge, and just used "git-diff next" instead of "git-diff --merge next". <Clickety-click/> Nope, that would not have worked either.
> Patch is below (wow, that +++ is kind of ugly!).
Same here.
Show 7 quoted lines
> git: choose internal commands over aliases for git-* > > This is especially important because some commands (like init-db) don't > require a working GIT_DIR, and alias expansion tries to look at it. It > also matches the behavior of "git cmd". > > Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Show 9 quoted lines
> @@ -289,8 +289,8 @@ int main(int argc, const char **argv, ch
> if (!strncmp(cmd, "git-", 4)) {
> cmd += 4;
> argv[0] = cmd;
> - handle_alias(&argc, &argv);
> handle_internal_command(argc, argv, envp);
> + handle_alias(&argc, &argv);
> die("cannot handle %s internally", cmd);
> }Alternatively, you can just delete it. IIRC we decided that aliases with "git-" commands do not make sense.
Ciao, Dscho