projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
bfc1f6a
)
Merge branch 'ef/non-ascii-parse-options-error-diag'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 15 Feb 2013 00:06:14 +0000
(16:06 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 15 Feb 2013 00:06:14 +0000
(16:06 -0800)
* ef/non-ascii-parse-options-error-diag:
parse-options: report uncorrupted multi-byte options
parse-options.c
patch
|
blob
|
history
diff --git
a/parse-options.c
b/parse-options.c
index a6ce9efb79df18ab433904024cce9cce2b1e56ce..c2cbca25cc6bb010996063c88c9af3e7b38aad5a 100644
(file)
--- a/
parse-options.c
+++ b/
parse-options.c
@@
-462,8
+462,11
@@
int parse_options(int argc, const char **argv, const char *prefix,
default: /* PARSE_OPT_UNKNOWN */
if (ctx.argv[0][1] == '-') {
error("unknown option `%s'", ctx.argv[0] + 2);
- } else {
+ } else
if (isascii(*ctx.opt))
{
error("unknown switch `%c'", *ctx.opt);
+ } else {
+ error("unknown non-ascii option in string: `%s'",
+ ctx.argv[0]);
}
usage_with_options(usagestr, options);
}