aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2011-04-10 21:09:14 +0530
committerJunio C Hamano <gitster@pobox.com>2011-04-13 11:02:49 -0700
commit5e31075a19acdd242996c83728b3c8e965af0d7b (patch)
tree5b7c4b6930c85e2076adb6388070a3f996fb8290 /builtin
parent9db19414582fdb154384ff1ca457cbf9095fef48 (diff)
downloadgit-5e31075a19acdd242996c83728b3c8e965af0d7b.tar.gz
git-5e31075a19acdd242996c83728b3c8e965af0d7b.tar.xz
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 <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/revert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index 2bb13ebb1..f697e6695 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),