git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] parse-options: lose an unnecessary space in an error message

From
Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com>
Date
Feb 5, 2020, 13:07 UTC
Message-ID
<0102017015765b98-e2e26f61-dd07-4a32-a72f-2d7b2159fffe-000000@eu-west-1.amazonses.com>
In-Reply-To
<010201671ebf523a-da55f2d8-876a-4b3b-a6fe-29d790bed2c1-000000@eu-west-1.amazonses.com>
Signed-off-by: Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com>
---
 parse-options.c          | 4 ++--
 t/t0040-parse-options.sh | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/parse-options.c b/parse-options.c
index b42f54d48b96c..71dbe84d896b4 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -420,7 +420,7 @@ static void check_typos(const char *arg, const struct option *options)
 		return;
 
 	if (starts_with(arg, "no-")) {
-		error(_("did you mean `--%s` (with two dashes ?)"), arg);
+		error(_("did you mean `--%s` (with two dashes)?"), arg);
 		exit(129);
 	}
 
@@ -428,7 +428,7 @@ static void check_typos(const char *arg, const struct option *options)
 		if (!options->long_name)
 			continue;
 		if (starts_with(options->long_name, arg)) {
-			error(_("did you mean `--%s` (with two dashes ?)"), arg);
+			error(_("did you mean `--%s` (with two dashes)?"), arg);
 			exit(129);
 		}
 	}
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 705a136ed92c9..9d7c7fdaa2af1 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -242,7 +242,7 @@ test_expect_success 'Alias options do not contribute to abbreviation' '
 '
 
 cat >typo.err <<\EOF
-error: did you mean `--boolean` (with two dashes ?)
+error: did you mean `--boolean` (with two dashes)?
 EOF
 
 test_expect_success 'detect possible typos' '
@@ -252,7 +252,7 @@ test_expect_success 'detect possible typos' '
 '
 
 cat >typo.err <<\EOF
-error: did you mean `--ambiguous` (with two dashes ?)
+error: did you mean `--ambiguous` (with two dashes)?
 EOF
 
 test_expect_success 'detect possible typos' '

--
https://github.com/git/git/pull/540
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 8 in “Typo `dashes ?` -> `dashes?`”
  1. Typo `dashes ?` -> `dashes?`Jacques Bodin-Hullin, Oct 14, 2018
  2. Jeff KingOct 15, 2018
  3. Change writing styleJacques Bodin-Hullin, Nov 16, 2018
  4. Junio C HamanoNov 17, 2018
  5. parse-options: lose an unnecessary space in an error messageJacques Bodin-Hullin, Feb 5, 2020
  6. Junio C HamanoFeb 5, 2020
  7. Jacques Bodin-HullinFeb 5, 2020
  8. Jeff KingOct 17, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.