Skip to content

Commit

Permalink
On error, do not list all commands, but point to --help option
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Jari Aalto authored and Shawn O. Pearce committed Oct 22, 2007
1 parent dd8175f commit b5d21a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions help.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ static void show_man_page(const char *git_cmd)

void help_unknown_cmd(const char *cmd)
{
printf("git: '%s' is not a git-command\n\n", cmd);
list_common_cmds_help();
fprintf(stderr, "git: '%s' is not a git-command. See --help\n\n", cmd);
exit(1);
}

Expand Down

0 comments on commit b5d21a4

Please sign in to comment.