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

[PATCH] revert: Hide '-r' option in default usage

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Apr 10, 2011, 15:39 UTC
Message-ID
<1302449954-15353-1-git-send-email-artagnon@gmail.com>

Since the '-r' command-line option is a no-op provided only for backward compatiblity, don't advertise it in the default usage.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
This is a minor detail I noticed while working on the sequencer.
 builtin/revert.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin/revert.c b/builtin/revert.c
index 2bb13eb..f697e66 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -76,7 +76,8 @@ static void parse_args(int argc, const char **argv)
 	struct option options[] = {
 		OPT_BOOLEAN('n', "no-commit", &no_commit, "don't automatically commit"),
 		OPT_BOOLEAN('e', "edit", &edit, "edit the commit message"),
-		OPT_BOOLEAN('r', NULL, &noop, "no-op (backward compatibility)"),
+		{ OPTION_BOOLEAN, 'r', NULL, &noop, NULL, "no-op (backward compatibility)",
+		  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 0 },
 		OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
 		OPT_INTEGER('m', "mainline", &mainline, "parent number"),
 		OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
-- 
1.7.4.rc1.7.g2cf08.dirty
Next: Junio C Hamano
Message 1 of 4 in “revert: Hide '-r' option in default usage”
  1. revert: Hide '-r' option in default usageRamkumar Ramachandra, Apr 10, 2011
  2. Junio C HamanoApr 11, 2011
  3. Ramkumar RamachandraApr 13, 2011
  4. Junio C HamanoApr 13, 2011

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.