Skip to content
  • Duy Nguyen's avatar
    diff.c: prepare to use parse_options() for parsing · 4a288478
    Duy Nguyen authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    4a288478