Re: [puzzled and solved] "shortlog" not quite understanding all "log" options
- From
Jeff King <peff@peff.net>
- Date
- Jun 18, 2014, 08:08 UTC
- Message-ID
- <20140618080848.GB11027@sigill.intra.peff.net>
- In-Reply-To
- <xmqqwqd36j9d.fsf@gitster.dls.corp.google.com>
On Fri, May 30, 2014 at 02:37:02PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> > I am slightly puzzled why parse_revision_opt does not just call > > handle_revision_pseudo_opt. According to f6aca0dc4, it is because > > pseudo-options need to be acted on in-order, as they affect things like > > subsequent "--not" options, etc. But if we are using parse_options_step, > > shouldn't we be handling the options in order? > > > > I am sure I am just missing something obvious, so do not trouble > > yourself if you do not know the answer offhand. > > Sorry, I don't know ;-)
Hopefully I am not wasting your time by responding to an old thread, but I figured this out and wanted to post it for posterity.
The answer is that it is not about handling _options_ in order, but that we need to handle pseudo-options in order with non-options, like:
foo --not bar
Stepping through the options with parseopt will just cover dashed options, but we handle non-option arguments later. So we have to handle the pseudo-arguments like "--not" at the same later time.
So there's nothing interesting to clean up or fix here.
-Peff