Skip to content

Commit 0ecc7d6

Browse files
committed
Merge branch 'jb/parse-options-message-fix' into maint
Error message fix. * jb/parse-options-message-fix: parse-options: lose an unnecessary space in an error message
2 parents 1ea6edf + 395518c commit 0ecc7d6

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
@@ -420,15 +420,15 @@ static void check_typos(const char *arg, const struct option *options)
420420
return;
421421

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

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

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)