git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] "git help" and "git help -a" shouldn't exit(1) unless they error

From
Scott R Parish <srp@srparish.net>
Date
Oct 21, 2007, 21:47 UTC
Message-ID
<20071021214744.GH16291@srparish.net>
Signed-off-by: Scott R Parish <srp@srparish.net>
---
 help.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/help.c b/help.c
index 1cd33ec..b0d2dd4 100644
--- a/help.c
+++ b/help.c
@@ -204,14 +204,14 @@ int cmd_help(int argc, const char **argv, const char *prefix)
 	if (!help_cmd) {
 		printf("usage: %s\n\n", git_usage_string);
 		list_common_cmds_help();
-		exit(1);
+		exit(0);
 	}
 
 	else if (!strcmp(help_cmd, "--all") || !strcmp(help_cmd, "-a")) {
 		printf("usage: %s\n\n", git_usage_string);
 		if(exec_path)
 			list_commands(exec_path, "git-*");
-		exit(1);
+		exit(0);
 	}
 
 	else
-- 
1.5.3.4.209.g5d1ce-dirty
Next: Shawn O. Pearce
Message 1 of 4 in “"git help" and "git help -a" shouldn't exit(1) unless they error”
  1. "git help" and "git help -a" shouldn't exit(1) unless they errorScott R Parish, Oct 21, 2007
  2. Shawn O. PearceOct 22, 2007
  3. Scott ParishOct 22, 2007
  4. Shawn O. PearceOct 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.