Re: [PATCH 2/2] parse-options API: remove OPTION_ARGUMENT feature
- From
Jeff King <peff@peff.net>
- Date
- Sep 12, 2021, 22:43 UTC
- Message-ID
- <YT6ChAivw2Vk7Jkd@coredump.intra.peff.net>
- In-Reply-To
- <patch-2.2-28b43789b11-20210911T182009Z-avarab@gmail.com>
On Sat, Sep 11, 2021 at 08:21:12PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 14 quoted lines
> As was noted in 1a85b49b87a (parse-options: make OPT_ARGUMENT() more > useful, 2019-03-14) there's only ever been one user of the > OPT_ARGUMENT(), that user was added in 20de316e334 (difftool: allow > running outside Git worktrees with --no-index, 2019-03-14). > > The OPT_ARGUMENT() feature itself was added way back in > 580d5bffdea (parse-options: new option type to treat an option-like > parameter as an argument., 2008-03-02), but as discussed in > 1a85b49b87a wasn't used until 20de316e334 in 2019. > > Now that the preceding commit has migrated this code over to using > "struct strvec" to manage the "args" member of a "struct > child_process", we can just use that directly instead of relying on > OPT_ARGUMENT.
Yeah, the change in difftool here looks fine (regardless of how the cleanup in the first patch gets there). And I'm happy to see this somewhat weird OPT_ macro go away if nobody is using it.
-Peff