Skip to content

Commit 5e31075

Browse files
artagnongitster
authored andcommitted
revert: Hide '-r' option in default usage
The '-r' command-line option is a no-op provided only for backward compatiblity since abd6970 (cherry-pick: make -r the default, 2006-10-05), and somehow ended up surviving across reimplementation in C at 9509af6 (Make git-revert & git-cherry-pick a builtin, 2007-03-01) and another rewrite of the command line parser at f810379 (Make builtin-revert.c use parse_options, 2007-10-07). We should have stopped advertising the option long time ago. Signed-off-by: Ramkumar Ramachandra <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9db1941 commit 5e31075

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/revert.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ static void parse_args(int argc, const char **argv)
7676
struct option options[] = {
7777
OPT_BOOLEAN('n', "no-commit", &no_commit, "don't automatically commit"),
7878
OPT_BOOLEAN('e', "edit", &edit, "edit the commit message"),
79-
OPT_BOOLEAN('r', NULL, &noop, "no-op (backward compatibility)"),
79+
{ OPTION_BOOLEAN, 'r', NULL, &noop, NULL, "no-op (backward compatibility)",
80+
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 0 },
8081
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
8182
OPT_INTEGER('m', "mainline", &mainline, "parent number"),
8283
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),

0 commit comments

Comments
 (0)