{"thread":{"id":"10425","subject":"[PATCH] \"git\" calls help_unknown_cmd(\"\"); \"git help\" and \"git help -a\" return 0","startedAt":"2007-10-22T08:32:39Z","lastAt":"2007-10-22T08:32:39Z","messageCount":1,"participants":["Scott R Parish"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"56840","messageId":"20071022083239.GA23428@srparish.net","threadId":"10425","inReplyTo":null,"subject":"[PATCH] \"git\" calls help_unknown_cmd(\"\"); \"git help\" and \"git help -a\" return 0","fromName":"Scott R Parish","fromEmail":"srp@srparish.net","sentAt":"2007-10-22T08:32:39Z","receivedAt":"2007-10-22T08:32:39Z","isPatch":true,"sender":{"key":"srp@srparish.net","avatar":"https://gravatar.com/avatar/870e5b6fc4f710cf4db5684bd9af7f2cee5734b3dab3209b13e00cf64f6c9f0e?d=mp&s=160"},"body":"Signed-off-by: Scott R Parish <srp@srparish.net>\n---\n git.c  |    5 ++---\n help.c |    4 ++--\n 2 files changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/git.c b/git.c\nindex 853e66c..e1c99e3 100644\n--- a/git.c\n+++ b/git.c\n@@ -445,9 +445,8 @@ int main(int argc, const char **argv)\n \t\tif (!prefixcmp(argv[0], \"--\"))\n \t\t\targv[0] += 2;\n \t} else {\n-\t\t/* Default command: \"help\" */\n-\t\targv[0] = \"help\";\n-\t\targc = 1;\n+\t\t/* The user didn't specify a command; give them help */\n+\t\thelp_unknown_cmd(\"\");\n \t}\n \tcmd = argv[0];\n \ndiff --git a/help.c b/help.c\nindex 1cd33ec..b0d2dd4 100644\n--- a/help.c\n+++ b/help.c\n@@ -204,14 +204,14 @@ int cmd_help(int argc, const char **argv, const char *prefix)\n \tif (!help_cmd) {\n \t\tprintf(\"usage: %s\\n\\n\", git_usage_string);\n \t\tlist_common_cmds_help();\n-\t\texit(1);\n+\t\texit(0);\n \t}\n \n \telse if (!strcmp(help_cmd, \"--all\") || !strcmp(help_cmd, \"-a\")) {\n \t\tprintf(\"usage: %s\\n\\n\", git_usage_string);\n \t\tif(exec_path)\n \t\t\tlist_commands(exec_path, \"git-*\");\n-\t\texit(1);\n+\t\texit(0);\n \t}\n \n \telse\n-- \n1.5.3.4.209.g5d1ce-dirty\n"}]}