Re: [PATCH 1/2] parse_options: Add flag to prevent errors for further processing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 18, 2008, 03:21 UTC
- Message-ID
- <7v1w2v2zsh.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1213758236-979-2-git-send-email-shawn.bohrer@gmail.com>
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?