diff options
author | Theodore Ts'o <tytso@mit.edu> | 2007-02-10 19:33:57 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-10 22:46:30 -0800 |
commit | f3dd015c9147e3116fc1941d96f4dad38386b1db (patch) | |
tree | 49a5a7b3a0c4666e94fb1da124925c9dff88d4fa /git.c | |
parent | 471efb09aaa266e75e499829fc31a59337ef4a96 (diff) | |
download | git-f3dd015c9147e3116fc1941d96f4dad38386b1db.tar.gz |
Print a sane error message if an alias expands to an invalid git command
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -387,8 +387,15 @@ int main(int argc, const char **argv, char **envp) done_alias = 1; } - if (errno == ENOENT) + if (errno == ENOENT) { + if (done_alias) { + fprintf(stderr, "Expansion of alias '%s' failed; " + "'%s' is not a git-command\n", + cmd, argv[0]); + exit(1); + } help_unknown_cmd(cmd); + } fprintf(stderr, "Failed to run command '%s': %s\n", cmd, strerror(errno)); |