diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-01-27 07:35:23 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-27 16:28:17 -0800 |
commit | 202fbb33156287feeabc39c46db0e9857cb97152 (patch) | |
tree | f609f6fb79e2386f788be51286347bd8339849e3 /config.h | |
parent | parse-options.h: remove extern on function prototypes (diff) | |
download | tgif-202fbb33156287feeabc39c46db0e9857cb97152.tar.xz |
parse-options: add one-shot mode
This is to help reimplement diff_opt_parse() using parse_options().
The behavior of parse_options() is changed to be the same as the
other:
- no argv0 in argv[], everything can be processed
- argv[] must not be updated, it's the caller's job to do that
- return the number of arguments processed
- leave all unknown options / non-options alone (this one can already
be achieved with PARSE_OPT_KEEP_UNKNOWN and
PARSE_OPT_STOP_AT_NON_OPTION)
This mode is NOT supposed to stay here for long. It's to help
converting diff/rev option parsing. Once that work is over and we can
just use parse_options() throughout the code base, this will be
deleted.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.h')
0 files changed, 0 insertions, 0 deletions