Commit f3dd015c authored by Theodore Ts'o's avatar Theodore Ts'o Committed by Junio C Hamano

Print a sane error message if an alias expands to an invalid git command

Signed-off-by: Theodore Ts'o's avatar"Theodore Ts'o" <>
Signed-off-by: default avatarJunio C Hamano <>
parent 471efb09
......@@ -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]);
fprintf(stderr, "Failed to run command '%s': %s\n",
cmd, strerror(errno));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment