• N
    rev-parse --parseopt: add the --stuck-long mode · f8c87212
    Nicolas Vigier 提交于
    Add the --stuck-long option to output the options in their long form
    if available, and with their arguments stuck.
    
    Contrary to the default form (non stuck arguments and short options),
    this can be parsed unambiguously when using options with optional
    arguments :
    
     - in the non stuck form, when an option is taking an optional argument
       you cannot know if the next argument is its optional argument, or the
       next option.
    
     - the long options form allows to differentiate between an empty argument
       '--option=' and an unset argument '--option', which is not possible
       with short options.
    Signed-off-by: NNicolas Vigier <boklm@mars-attacks.org>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    f8c87212
t1502-rev-parse-parseopt.sh 3.7 KB