Re: [PATCH 00/20] parse-options: handle subcommands
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jul 25, 2022, 16:00 UTC
- Message-ID
- <20220725160040.GA2543@szeder.dev>
- In-Reply-To
- <16acb1ce-92eb-d7ec-d5a2-3ef08cda9b69@github.com>
On Mon, Jul 25, 2022 at 09:15:45AM -0400, Derrick Stolee wrote:
Show 7 quoted lines
> I focused on reading the changes to the builtins I have experience with > (commit-graph, maintenance, multi-pack-index, sparse-checkout, worktree) > and found the adaptation to the new model very clean. > > The one common thing I saw was that you are updating a function pointer > that you name "fn" but it could be more informative on first reading if > it was named something like "subcommand_fn".
I felt that redundant, because most lines mentioning that 'fn' have something clearly subcommand-specific next to it, i.e. the type 'parse_opt_subcommand_fn' at its declaration, or the OPT_SUBCOMMAND macro.