On Mon, Jun 23, 2008 at 09:26:39PM +0000, Linus Torvalds wrote: > > > On Mon, 23 Jun 2008, Pierre Habouzit wrote: > > > > Let's see if I can catch it elegantly. > > No. > > Look at builtin-blame.c. > > THEN get back to me. > > Trust me, you need what I wrote. Something that parses all the options in > one go, and ignores the ones it cannot parse, because a TOTALLY DIFFERENT > function than the caller will call it! Well I really believe that with an incremental parse_revisions (I have sent the patch to split {init,parse,setup}_revisions already) instead of the 'do all at once' version, you can write the code in builtin-blame in one pass exactly with the series I wrote. > Why is that so hard to accept? Especially since I already wrote the code > and sent it out? I don't find it "hard to accept", I just don't like the idea because it's broken wrt some parse-options mechanisms that I like a lot, and would be sad to see broken, and that with a little work can be overcomed. Note that builtin-blame is contains probably the most involved option parser in git.git, and isn't really what one could call representative of what awaits us on the path of migrating git.git to parse-options fully. I don't expect it to be easy to migrate at all. I do believe your code works too, it's obvious to see it does actually. But it could be made better, with real code that I will provide, just not tonight because I'm exhausted. Note that an incremental parse_revisions/parse_diff_opts/.. are a precodition to many CLI parsers conversions anyways, so if the task seems a bit exagerated for the sake of git-blame only, it actually helps for dozens of other commands, where the conversion will just be trivial. I fully understand you frustration wrt the poor handling of the command line arguments in many git commands. Believe me I really do. I know I haven't been active on this front for something like 6 months, but I'm sadly not payed to work on git.git ;p Though things are moving right now, so why don't we wait another week to see what other propose ? -- ·O· Pierre Habouzit ··O madcoder@xxxxxxxxxx OOO http://www.madism.org
Attachment:
pgpRlDfGqMD7B.pgp
Description: PGP signature