Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
parse-options: make sure argh string does not have SP or _
[gitweb.git]
/
parse-options.c
diff --git
a/parse-options.c
b/parse-options.c
index a5fa0b8938cb2820635bbc620b1b26cc903a6c97..c81d3a06550a1015ab0f4f7284bb48dce0293ab2 100644
(file)
--- a/
parse-options.c
+++ b/
parse-options.c
@@
-375,6
+375,9
@@
static void parse_options_check(const struct option *opts)
default:
; /* ok. (usually accepts an argument) */
}
+ if (opts->argh &&
+ strcspn(opts->argh, " _") != strlen(opts->argh))
+ err |= optbug(opts, "multi-word argh should use dash to separate words");
}
if (err)
exit(128);