From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>,
git@vger.kernel.org, madcoder@debian.org
Subject: Re: [PATCH 1/2] parse_options: Add flag to prevent errors for further processing
Date: Tue, 17 Jun 2008 23:30:10 -0400 [thread overview]
Message-ID: <20080618033010.GA19657@sigill.intra.peff.net> (raw)
In-Reply-To: <7v1w2v2zsh.fsf@gitster.siamese.dyndns.org>
On Tue, Jun 17, 2008 at 08:21:50PM -0700, Junio C Hamano wrote:
> Shawn Bohrer <shawn.bohrer@gmail.com> writes:
>
> > This adds the PARSE_OPT_NO_ERROR_ON_UNKNOWN flag which prevents
> > parse_options() from erroring out when it finds an unknown option,
> > and leaves the original command and unknown options in argv.
>
> I have to say that this conceptually is broken. How would you tell
> without knowing what "--flag" is if the thing in argv[] after that is a
> parameter to that option or the end of the options?
Agreed. I was just about to write the same thing. As it happens, I think
in the case of git-shortlog that there is not likely to be such a
parameter. The only three I see looking over setup_revisions are "-n"
(which is masked by shortlog anyway), "--default", and "-U" (which one
would never need with shortlog).
However I am still opposed to the concept, since its presence as a
parseopt flag implies that it isn't fundamentally broken.
I think the only right way to accomplish this is to convert the revision
and diff parameters into a parseopt-understandable format.
-Peff
next prev parent reply other threads:[~2008-06-18 3:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 3:03 [RFC] convert shortlog to use parse_options Shawn Bohrer
2008-06-18 3:03 ` [PATCH 1/2] parse_options: Add flag to prevent errors for further processing Shawn Bohrer
2008-06-18 3:03 ` [PATCH 2/2] git shortlog: Modify to use parse_options Shawn Bohrer
2008-06-18 3:21 ` [PATCH 1/2] parse_options: Add flag to prevent errors for further processing Junio C Hamano
2008-06-18 3:30 ` Jeff King [this message]
2008-06-18 3:34 ` Jeff King
2008-06-18 5:13 ` Junio C Hamano
2008-06-18 16:50 ` Johannes Schindelin
2008-06-18 18:52 ` Junio C Hamano
2008-06-19 14:25 ` Shawn Bohrer
2008-06-22 19:07 ` Johannes Schindelin
2008-06-23 19:55 ` Junio C Hamano
2008-06-23 19:59 ` Jeff King
2008-06-23 20:17 ` Junio C Hamano
2008-06-23 20:24 ` Johannes Schindelin
2008-06-22 17:07 ` Pierre Habouzit
2008-06-23 1:45 ` Junio C Hamano
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=20080618033010.GA19657@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=madcoder@debian.org \
--cc=shawn.bohrer@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).