Re: [RFC] Re: Convert 'git blame' to parse_options()
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jun 23, 2008, 17:21 UTC
- Message-ID
- <alpine.LFD.1.10.0806231019170.2926@woody.linux-foundation.org>
- In-Reply-To
- <alpine.DEB.1.00.0806231756340.6440@racer>
On Mon, 23 Jun 2008, Johannes Schindelin wrote:
Show 8 quoted lines
> > > Look at cmd_apply() in builtin-apply.c. Notice how it currently > > absolutely CANNOT sanely be turned into using "parse_options()", not > > because it needs any "recursive" handling, but simply because it wants > > to do *incremental* handling. > > That is a totally independent issue from the one I discussed, namely sane > handling of the diff (and rev) options.
No it is not.
YOU THINK it is "independent" just because YOUR SOLUTION can do only one case.
And I say: my solution handles both cases, so it's not "independent" any more.
See?
(And yes, I can handle even the --help cases. It's actually not that hard to just remember all the different option structs you've seen, and handle all of that totally independently internally in parse_options(). You don't need recursion, you just need a trivial list of options.)
Linus