From b5d21a4b68aa69c7a2b4d2239aaa9ee5a51058a7 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Sun, 21 Oct 2007 01:41:41 +0300 Subject: [PATCH 1/2] 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 Signed-off-by: Shawn O. Pearce --- help.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/help.c b/help.c index 1cd33ece6..814a8cd02 100644 --- a/help.c +++ b/help.c @@ -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); } From a238917ba48c44de8a00e3aee7898d9beb5afcd8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 26 Oct 2007 23:26:41 -0700 Subject: [PATCH 2/2] help: remove extra blank line after "See 'git --help'" message The double LF were there only because we gave a list of common commands. WIth the list gone, there is no reason to have the extra blank line. Signed-off-by: Junio C Hamano --- help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help.c b/help.c index 814a8cd02..e5662d901 100644 --- a/help.c +++ b/help.c @@ -185,7 +185,7 @@ static void show_man_page(const char *git_cmd) void help_unknown_cmd(const char *cmd) { - fprintf(stderr, "git: '%s' is not a git-command. See --help\n\n", cmd); + fprintf(stderr, "git: '%s' is not a git-command. See 'git --help'.\n", cmd); exit(1); }