On error, do not list all commands, but point to --help option
- Remove out call to list_common_cmds_help() - Send error message to stderr, not stdout. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Jari Aalto committed
Oct 21, 2007 at 01:41 UTC
b5d21a4b68aa69c7a2b4d2239aaa9ee5a51058a7
1 file changed
+1
-2
help.c
+1
-2
@@ -185,8 +185,7 @@ static void show_man_page(const char *git_cmd)
185
186
void help_unknown_cmd(const char *cmd)
187
{
188
- printf("git: '%s' is not a git-command\n\n", cmd);
189
- list_common_cmds_help();
188
+ fprintf(stderr, "git: '%s' is not a git-command. See --help\n\n", cmd);
189
exit(1);
190
}
191