Re: [PATCH 00/20] parse-options: handle subcommands
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Jul 25, 2022, 16:08 UTC
- Message-ID
- <4e28ea5a-03d3-990c-34ad-5d5a91d7b888@github.com>
- In-Reply-To
- <20220725160040.GA2543@szeder.dev>
On 7/25/2022 12:00 PM, SZEDER Gábor wrote:
Show 13 quoted lines
> On Mon, Jul 25, 2022 at 09:15:45AM -0400, Derrick Stolee wrote: >> 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.
I guess I was just reading the final "return fn(...);" at the end and thought it looked a bit generic. It's probably not worth changing.
Thanks, -Stolee