diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2009-03-09 21:57:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-09 15:32:50 -0700 |
commit | 0d260f9a09a2febeb86fdada7224d271a76d2e3c (patch) | |
tree | fc941df4ea65bc64faf78bfe93a877554a72dccd /t/t4013/diff.diff-tree_-c_master | |
parent | parseopt: document KEEP_ARGV0, KEEP_UNKNOWN, NO_INTERNAL_HELP (diff) | |
download | tgif-0d260f9a09a2febeb86fdada7224d271a76d2e3c.tar.xz |
parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used together
As suggested by Junio, disallow the flags PARSE_OPT_KEEP_UNKNOWN and
PARSE_OPT_STOP_AT_NON_OPTION to be turned on at the same time, as a
value of an unknown option could be mistakenly classified as a
non-option, stopping the parser early. E.g.:
git cmd --known --unknown value arg0 arg1
The parser should have stopped at "arg0", but it already stops at
"value".
This patch makes parse_options() die if the two flags are used in
combination.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_-c_master')
0 files changed, 0 insertions, 0 deletions