Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

* ef/non-ascii-parse-options-error-diag:
  parse-options: report uncorrupted multi-byte options
  • Loading branch information...
commit 6bdecc8f56a06f085b4444dc29361a5aa80d9eef 2 parents bfc1f6a + b141a47
@gitster authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 parse-options.c
View
5 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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.