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

[PATCH] revert/cherry-pick: allow the last parameter to be -h

From
Jonas Fonseca <fonseca@diku.dk>
Date
May 22, 2007, 21:29 UTC
Message-ID
<20070522212945.GA8002@diku.dk>
... to ask for the usage string.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 builtin-revert.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin-revert.c b/builtin-revert.c
index ea2f15b..7984aeb 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -61,6 +61,8 @@ static void parse_options(int argc, const char **argv)
 	}
 
 	arg = argv[argc - 1];
+	if (!strcmp(arg, "-h"))
+		usage(usage_str);
 	if (get_sha1(arg, sha1))
 		die ("Cannot find '%s'", arg);
 	commit = (struct commit *)parse_object(sha1);
-- 
1.5.2.rc3.800.ga489e-dirty

-- 
Jonas Fonseca
Next: Alex Riesen
Message 1 of 7 in “revert/cherry-pick: allow the last parameter to be -h”
  1. revert/cherry-pick: allow the last parameter to be -hJonas Fonseca, May 22, 2007
  2. Alex RiesenMay 22, 2007
  3. Junio C HamanoMay 22, 2007
  4. Jonas FonsecaMay 23, 2007
  5. Junio C HamanoMay 23, 2007
  6. Jonas FonsecaMay 23, 2007
  7. Junio C HamanoMay 23, 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.