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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:01

Ramkumar Ramachandra [off-list ref] writes:
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 <redacted>
---
Thanks.

It would have saved me a lot of time if you wrote that this option has
been a no-op since abd6970 (cherry-pick: make -r the default, 2006-10-05),
but the commit didn't remove it from the usage string, and it somehow
survived 9509af6 (Make git-revert & git-cherry-pick a builtin, 2007-03-01)
and later f810379 (Make builtin-revert.c use parse_options, 2007-10-07),
and it is about time to stop advertising it.
quoted hunk
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),

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

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:51:02

Hi Junio,

Junio C Hamano writes:
Ramkumar Ramachandra [off-list ref] writes:
quoted
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 <redacted>
---
Thanks.

It would have saved me a lot of time if you wrote that this option has
been a no-op since abd6970 (cherry-pick: make -r the default, 2006-10-05),
but the commit didn't remove it from the usage string, and it somehow
survived 9509af6 (Make git-revert & git-cherry-pick a builtin, 2007-03-01)
and later f810379 (Make builtin-revert.c use parse_options, 2007-10-07),
and it is about time to stop advertising it.
Thanks.  I didn't realize there was so much history to write about.
Has you queued this somewhere?

-- Ram
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help