* [PATCH] revert: Hide '-r' option in default usage
@ 2011-04-10 15:39 Ramkumar Ramachandra
2011-04-11 21:06 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Ramkumar Ramachandra @ 2011-04-10 15:39 UTC (permalink / raw)
To: Git List
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] revert: Hide '-r' option in default usage
2011-04-10 15:39 [PATCH] revert: Hide '-r' option in default usage Ramkumar Ramachandra
@ 2011-04-11 21:06 ` Junio C Hamano
2011-04-13 13:21 ` Ramkumar Ramachandra
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2011-04-11 21:06 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: Git List
Ramkumar Ramachandra <artagnon@gmail.com> 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 <artagnon@gmail.com>
> ---
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.
> 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),
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] revert: Hide '-r' option in default usage
2011-04-11 21:06 ` Junio C Hamano
@ 2011-04-13 13:21 ` Ramkumar Ramachandra
2011-04-13 18:09 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Ramkumar Ramachandra @ 2011-04-13 13:21 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git List
Hi Junio,
Junio C Hamano writes:
> Ramkumar Ramachandra <artagnon@gmail.com> 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 <artagnon@gmail.com>
> > ---
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] revert: Hide '-r' option in default usage
2011-04-13 13:21 ` Ramkumar Ramachandra
@ 2011-04-13 18:09 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2011-04-13 18:09 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: Git List
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> Hi Junio,
>
> Junio C Hamano writes:
>> Ramkumar Ramachandra <artagnon@gmail.com> 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 <artagnon@gmail.com>
>> > ---
>>
>> 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.
Not necessarily in the final commit message; before "---" would have been
sufficient.
> Has you queued this somewhere?
Sorry, after spending time to dig the history to see when we made this a
no-op to ensure that it was sufficiently long time ago and wrote my
finding in the message to you, I forgot to apply the patch. Will queue.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-13 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 15:39 [PATCH] revert: Hide '-r' option in default usage Ramkumar Ramachandra
2011-04-11 21:06 ` Junio C Hamano
2011-04-13 13:21 ` Ramkumar Ramachandra
2011-04-13 18:09 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).