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

Re: [PATCH] Typo `dashes ?` -> `dashes?`

From
Jeff King <peff@peff.net>
Date
Oct 15, 2018, 17:20 UTC
Message-ID
<20181015172041.GC1301@sigill.intra.peff.net>
In-Reply-To
<01020166741c381f-bd183f7f-725d-4b4f-9f5f-804560b2b00b-000000@eu-west-1.amazonses.com>
On Sun, Oct 14, 2018 at 07:44:58PM +0000, Jacques Bodin-Hullin wrote:
Show 10 quoted lines
> diff --git a/parse-options.c b/parse-options.c
> index 3b874a83a0c89..88512212392ae 100644
> --- a/parse-options.c
> +++ b/parse-options.c
> @@ -352,7 +352,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);

I agree the extra space in the original is stylistically weird, and your suggestion is an improvement. However, I think this is really a question "did you mean..." with a parenthetical phrase. Most style guides would recommend putting the punctuation outside, like:

  error: did you mean `--foo` (with two dashes)?

Speaking of style, the extra space between "error" and "(" does not match our usual coding style. It might be worth removing while we're touching these lines.

-Peff
Previous: Jacques Bodin-HullinNext: Jacques Bodin-Hullin
Message 2 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.