Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ef/non-ascii-parse-options-error-diag' into maint
author
Junio C Hamano
<gitster@pobox.com>
Wed, 27 Feb 2013 18:04:26 +0000
(10:04 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 27 Feb 2013 18:04:26 +0000
(10:04 -0800)
* ef/non-ascii-parse-options-error-diag:
parse-options: report uncorrupted multi-byte options
parse-options.c
patch
|
blob
|
history
raw
(from parent 1:
28db111
)
diff --git
a/parse-options.c
b/parse-options.c
index 670bf09b452e5e74a76df17535ea53b133d26091..7ca8f2caef5606cdac98e9a96c0226a53695f763 100644
(file)
--- a/
parse-options.c
+++ b/
parse-options.c
@@
-471,8
+471,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);
}