提交 6bdecc8f 编写于 作者: J Junio C Hamano

Merge branch 'ef/non-ascii-parse-options-error-diag'

* ef/non-ascii-parse-options-error-diag:
  parse-options: report uncorrupted multi-byte options
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册