From: Jeff King <peff@peff.net>
To: Mark Lodato <lodatom@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH] Add an optional argument for --color options
Date: Mon, 15 Feb 2010 00:21:39 -0500 [thread overview]
Message-ID: <20100215052139.GH3336@coredump.intra.peff.net> (raw)
In-Reply-To: <ca433831002140658r30aa539fy5480cae8298d6d6c@mail.gmail.com>
On Sun, Feb 14, 2010 at 09:58:58AM -0500, Mark Lodato wrote:
> > Hmm...the only one I see that silently ignores is "--submodule=bogus".
> > But it seems that "git log -Bfoobar" fails but does not print a useful
> > message. Probably both should be fixed, and your option should follow
> > the same convention as those.
>
> Just wondering, why does diff use a separate option parsing mechanism
> than the rest of the code? Would it be worthwhile to switch to
> parse_opt? This may make the code cleaner, and it would definitely
> make the command-line interface more consistent with the rest of the
> suite. From a user's point of view, the biggest win would be "-h"
> printing all of the options, like all the non-diff commands do.
It's historical. The diff option parser predates parse-options by quite
a bit, and was never converted. Pierre made some attempts at converting
it and the revision parser some time back, and we ended up with the more
iterative approach (you can step through each argument with
parse-options, and then alternatively feed it to the revision and diff
options parser).
I don't remember if there were any technical limitations, though (e.g.,
places where the revision parser does not conform to parse-options
standards or needs some special treatment). You'd have to search the
list archives to see what actually happened.
-Peff
next prev parent reply other threads:[~2010-02-15 5:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-13 22:01 [PATCH] Add an optional argument for --color options Mark Lodato
2010-02-14 6:44 ` Jeff King
2010-02-14 12:21 ` Jonathan Nieder
2010-02-14 14:58 ` Mark Lodato
2010-02-15 1:18 ` Jonathan Nieder
2010-02-15 5:23 ` Jeff King
2010-02-15 1:23 ` Usage messages produced by parseopt (Re: [PATCH] Add an optional argument for --color options) Jonathan Nieder
2010-02-15 5:21 ` Jeff King [this message]
2010-02-15 6:02 ` [PATCH] Add an optional argument for --color options Junio C Hamano
2010-02-14 11:39 ` Junio C Hamano
2010-02-14 14:46 ` Mark Lodato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100215052139.GH3336@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=lodatom@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).