• C
    parse-options: move unsigned long option parsing out of pack-objects.c · 2a514ed8
    Charles Bailey 提交于
    The unsigned long option parsing (including 'k'/'m'/'g' suffix
    parsing) is more widely applicable.  Add support for OPT_MAGNITUDE
    to parse-options.h and change pack-objects.c use this support.
    
    The error behavior on parse errors follows that of OPT_INTEGER.  The
    name of the option that failed to parse is reported with a brief
    message describing the expect format for the option argument and
    then the full usage message for the command invoked.
    
    This differs from the previous behavior for OPT_ULONG used in
    pack-objects for --max-pack-size and --window-memory which used to
    display the value supplied in the error message and did not display
    the full usage message.
    Signed-off-by: NCharles Bailey <cbailey32@bloomberg.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    2a514ed8
parse-options.c 17.7 KB