Merge branch 'nd/diff-parseopt'
A brown-paper-bag bugfix to a change already in 'master'. * nd/diff-parseopt: parse-options: check empty value in OPT_INTEGER and OPT_ABBREV diff-parseopt: restore -U (no argument) behavior diff-parseopt: correct variable types that are used by parseopt
This commit is contained in:
@ -16,6 +16,9 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset)
|
||||
if (!arg) {
|
||||
v = unset ? 0 : DEFAULT_ABBREV;
|
||||
} else {
|
||||
if (!*arg)
|
||||
return error(_("option `%s' expects a numerical value"),
|
||||
opt->long_name);
|
||||
v = strtol(arg, (char **)&arg, 10);
|
||||
if (*arg)
|
||||
return error(_("option `%s' expects a numerical value"),
|
||||
|
Reference in New Issue
Block a user