Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'vv/merge-squash-with-explicit-commit'
[gitweb.git]
/
parse-options.c
diff --git
a/parse-options.c
b/parse-options.c
index 987e27cb91162ab03320ff9674f3ad52ffa829b4..87b26a1d922e8905fe369b164ae5cad7ea372426 100644
(file)
--- a/
parse-options.c
+++ b/
parse-options.c
@@
-195,6
+195,9
@@
static enum parse_opt_result get_value(struct parse_opt_ctx_t *p,
}
if (get_arg(p, opt, flags, &arg))
return -1;
+ if (!*arg)
+ return error(_("%s expects a numerical value"),
+ optname(opt, flags));
*(int *)opt->value = strtol(arg, (char **)&s, 10);
if (*s)
return error(_("%s expects a numerical value"),