From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
Cc: git@vger.kernel.org, carlos.duclos@nokia.com,
Pierre Habouzit <madcoder@madism.org>
Subject: Re: [PATCH 1/4] parseopt: add PARSE_OPT_KEEP_UNKNOWN
Date: Sun, 08 Mar 2009 13:30:56 -0700 [thread overview]
Message-ID: <7vmybvkb9b.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vvdqjkbka.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Sun, 08 Mar 2009 13:24:21 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
>
>> Add a parseopt flag, PARSE_OPT_KEEP_UNKNOWN, that can be used to keep
>> unknown options in argv, similar to the existing KEEP flags.
>
> Very nice.
>
> The only caveat I can think of is with PARSE_OPT_STOP_AT_NON_OPTION set
> (which is not default), you can correctly handle:
>
> git cmd --known --unknown=value arg0 arg1
>
> but cannot correctly handle:
>
> git cmd --known --unknown value arg0 arg1
>
> An update to Documentation/technical/api-parse-options.txt that
>
> (1) describes this new option; and
>
> (2) warns about this issue.
"is necessary" is necessary here to complete my sentence. Sorry.
> It might even make sense to diagnose PARSE_OPT_STOP_AT_NON_OPTION used
> together with PARSE_OPT_KEEP_UNKNOWN as a programming error.
next prev parent reply other threads:[~2009-03-08 20:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 10:07 What's in git.git (Mar 2009, #02; Thu, 05) Junio C Hamano
2009-03-07 19:14 ` René Scharfe
2009-03-08 18:12 ` [PATCH 1/4] parseopt: add PARSE_OPT_KEEP_UNKNOWN René Scharfe
2009-03-08 20:24 ` Junio C Hamano
2009-03-08 20:30 ` Junio C Hamano [this message]
2009-03-09 20:26 ` [PATCH 5/4] parseopt: document KEEP_ARGV0, KEEP_UNKNOWN, NO_INTERNAL_HELP René Scharfe
2009-03-09 20:57 ` [PATCH 6/4] parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used together René Scharfe
2009-03-08 18:15 ` [PATCH 2/4] parseopt: add PARSE_OPT_NO_INTERNAL_HELP René Scharfe
2009-03-08 18:16 ` [PATCH 3/4] parseopt: make usage optional René Scharfe
2009-03-08 20:25 ` Junio C Hamano
2009-03-09 20:19 ` René Scharfe
2009-03-08 18:21 ` [PATCH 4/4] archive: use parseopt for local-only options René Scharfe
2009-03-08 20:20 ` 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=7vmybvkb9b.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=carlos.duclos@nokia.com \
--cc=git@vger.kernel.org \
--cc=madcoder@madism.org \
--cc=rene.scharfe@lsrfire.ath.cx \
/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).