Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] Allow an alias to start with "-p"

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:34

Possibly related (same subject, not in this thread)

Hi,

On Tue, 25 Jul 2006, Jeff King wrote:
On Mon, Jul 24, 2006 at 02:10:45PM +0200, Johannes Schindelin wrote:
quoted
@@ -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.
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 <redacted>
Acked-by: Johannes Schindelin <redacted>
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help