Re: [RFC] Re: Convert 'git blame' to parse_options()
- From
Jeff King <peff@peff.net>
- Date
- Jun 23, 2008, 17:26 UTC
- Message-ID
- <20080623172612.GD27265@sigill.intra.peff.net>
- In-Reply-To
- <alpine.DEB.1.00.0806231756340.6440@racer>
On Mon, Jun 23, 2008 at 06:04:48PM +0100, Johannes Schindelin wrote:
Show 5 quoted lines
> > > Thinking about the recursive approach again, I came up with this POC: > > > > "recursive" is pointless. > > Nope, it is not.
AIUI, one difference between your approach and Pierre's is that he is suggesting (and I have suggested this in the past, too) a big DIFF_OPTIONS macro that you stick in the options table for each command. Whereas you are allowing for subtables accessible via pointers.
Your approach should yield a much leaner text size (which was what started this whole thing) since we don't end up with the same repeated subsets of options tables, and in particular the one-liner help text (yes, compilers can sometimes point share the string literal components, but most of our options tables are declared as static, so unless the linker is very smart, I think we will end up with duplicates).
> Heck, we could just as easily introduce PARSE_OPT_IGNORE_UNKNOWN.
We could even send it to the list with message-id
http://mid.gmane.org/1213758236-979-2-git-send-email-shawn.bohrer@gmail.com
and then Junio and I could complain that the concept is broken.
-Peff