Re: [PATCH 2/8] builtin/reflog: improve grouping of subcommands
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jul 24, 2025, 07:42 UTC
- Message-ID
- <aIHj4NWr3M5lXLtD@pks.im>
- In-Reply-To
- <32gvkjmjz6otqwpaxafmz5xuznowhn4iwcdyn52qhbvzohyih4@oeimg3xvqj5u>
On Wed, Jul 23, 2025 at 01:14:19PM -0500, Justin Tobler wrote:
Show 17 quoted lines
> > @@ -404,10 +404,10 @@ int cmd_reflog(int argc,
> > struct option options[] = {
> > OPT_SUBCOMMAND("show", &fn, cmd_reflog_show),
> > OPT_SUBCOMMAND("list", &fn, cmd_reflog_list),
> > - OPT_SUBCOMMAND("expire", &fn, cmd_reflog_expire),
> > - OPT_SUBCOMMAND("delete", &fn, cmd_reflog_delete),
> > OPT_SUBCOMMAND("exists", &fn, cmd_reflog_exists),
> > + OPT_SUBCOMMAND("delete", &fn, cmd_reflog_delete),
> > OPT_SUBCOMMAND("drop", &fn, cmd_reflog_drop),
> > + OPT_SUBCOMMAND("expire", &fn, cmd_reflog_expire),
> > OPT_END()
> > };
>
> Structing the subcommands order in such a manner seems sensible, but I'm
> not sure the pattern will be recognized by others that may add
> subcommands in the future. Maybe we could leave a comment that mentions
> the order?Hm, dunno. I feel like it's subjective where to add a command anyway, so I'm not sure that a comment would be allt hat helpful.
Patrick