diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-01-27 07:35:31 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-27 16:28:18 -0800 |
commit | 4a2884783949d1791ee5d720d8440d5536ebdc91 (patch) | |
tree | 836cb0a7c1dd00d0952495bf8fff1f5a555890cc /xdiff/xutils.c | |
parent | diff.h: avoid bit fields in struct diff_flags (diff) | |
download | tgif-4a2884783949d1791ee5d720d8440d5536ebdc91.tar.xz |
diff.c: prepare to use parse_options() for parsing
This is a preparation step to start using parse_options() to parse
diff/revision options instead of what we have now. There are a couple
of good things from using parse_options():
- better help usage
- easier to add new options
- better completion support
- help usage generation
- better integration with main command option parser. We can just
concat the main command's option array and diffopt's together and
parse all in one go.
- detect colidding options (e.g. --reverse is used by revision code,
so diff code can't use it as long name for -R)
- consistent syntax, e.g. option that takes mandatory argument will
now accept both "--option=value" and "--option value".
The plan is migrate all diff/rev options to parse_options(). Then we
could get rid of diff_opt_parse() and expose parseopts[] directly to
the caller.
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 'xdiff/xutils.c')
0 files changed, 0 insertions, 0 deletions