Skip to content

Commit db72f8c

Browse files
committed
Merge branch 'jb/parse-options-message-fix'
Error message fix. * jb/parse-options-message-fix: parse-options: lose an unnecessary space in an error message
2 parents 3d2471b + 395518c commit db72f8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

parse-options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,15 +419,15 @@ static void check_typos(const char *arg, const struct option *options)
419419
return;
420420

421421
if (starts_with(arg, "no-")) {
422-
error(_("did you mean `--%s` (with two dashes ?)"), arg);
422+
error(_("did you mean `--%s` (with two dashes)?"), arg);
423423
exit(129);
424424
}
425425

426426
for (; options->type != OPTION_END; options++) {
427427
if (!options->long_name)
428428
continue;
429429
if (starts_with(options->long_name, arg)) {
430-
error(_("did you mean `--%s` (with two dashes ?)"), arg);
430+
error(_("did you mean `--%s` (with two dashes)?"), arg);
431431
exit(129);
432432
}
433433
}

t/t0040-parse-options.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ test_expect_success 'Alias options do not contribute to abbreviation' '
242242
'
243243

244244
cat >typo.err <<\EOF
245-
error: did you mean `--boolean` (with two dashes ?)
245+
error: did you mean `--boolean` (with two dashes)?
246246
EOF
247247

248248
test_expect_success 'detect possible typos' '
@@ -252,7 +252,7 @@ test_expect_success 'detect possible typos' '
252252
'
253253

254254
cat >typo.err <<\EOF
255-
error: did you mean `--ambiguous` (with two dashes ?)
255+
error: did you mean `--ambiguous` (with two dashes)?
256256
EOF
257257

258258
test_expect_success 'detect possible typos' '

0 commit comments

Comments
 (0)