Re: [PATCH 1/2] parse-options: introduce OPT_SUBCOMMAND
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Dec 8, 2011, 16:43 UTC
- Message-ID
- <CALkWK0ksMPjjh8EJjJz6wKS6ciF9x59n3KFauJvnB-1D4d4N1w@mail.gmail.com>
- In-Reply-To
- <20111208163049.GA2116@elie.hsd1.il.comcast.net>
Hi,
Jonathan Nieder wrote:
Show 8 quoted lines
> Ramkumar Ramachandra wrote: >> , and create a new >> OPT_SUBCOMMAND; this is built on top of OPTION_BIT to allow for the >> detection of more than one subcommand. > > This part I am not convinced about. Usually each subcommand takes its > own options, so I cannot see this OPT_SUBCOMMAND being actually useful > for commands like "git stash" or "git remote".
Hm, what difference does that make? We still have to parse the subcommand, and subsequently use an if-else construct to parse more options depending on the subcommand, no?
-- Ram