Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
tag: add tag.gpgSign config option to force all tags be GPG-signed
[gitweb.git]
/
parse-options-cb.c
diff --git
a/parse-options-cb.c
b/parse-options-cb.c
index 4b95d04a37c028322c6fbf7d3f1b59e0d541fdb3..a3de795c581a3aab084efac75ed2d6edc2535a15 100644
(file)
--- a/
parse-options-cb.c
+++ b/
parse-options-cb.c
@@
-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"),