{"thread":{"id":"49561","subject":"[PATCH] Typo `dashes ?` -> `dashes?`","startedAt":"2018-10-14T19:45:02Z","lastAt":"2020-02-05T20:11:50Z","messageCount":8,"participants":["Jacques Bodin-Hullin","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"360410","messageId":"01020166741c381f-bd183f7f-725d-4b4f-9f5f-804560b2b00b-000000@eu-west-1.amazonses.com","threadId":"49561","inReplyTo":null,"subject":"[PATCH] Typo `dashes ?` -> `dashes?`","fromName":"Jacques Bodin-Hullin","fromEmail":"j.bodinhullin@monsieurbiz.com","sentAt":"2018-10-14T19:44:58Z","receivedAt":"2018-10-14T19:45:02Z","isPatch":true,"sender":{"key":"j.bodinhullin@monsieurbiz.com","avatar":"https://avatars.githubusercontent.com/u/858611?v=4"},"body":"---\n parse-options.c          | 4 ++--\n t/t0040-parse-options.sh | 4 ++--\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/parse-options.c b/parse-options.c\nindex 3b874a83a0c89..88512212392ae 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -352,7 +352,7 @@ static void check_typos(const char *arg, const struct option *options)\n \t\treturn;\n \n \tif (starts_with(arg, \"no-\")) {\n-\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n+\t\terror (\"did you mean `--%s` (with two dashes?)\", arg);\n \t\texit(129);\n \t}\n \n@@ -360,7 +360,7 @@ static void check_typos(const char *arg, const struct option *options)\n \t\tif (!options->long_name)\n \t\t\tcontinue;\n \t\tif (starts_with(options->long_name, arg)) {\n-\t\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n+\t\t\terror (\"did you mean `--%s` (with two dashes?)\", arg);\n \t\t\texit(129);\n \t\t}\n \t}\ndiff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\nindex 5b0560fa20e34..16fd333bd3895 100755\n--- a/t/t0040-parse-options.sh\n+++ b/t/t0040-parse-options.sh\n@@ -222,7 +222,7 @@ test_expect_success 'non ambiguous option (after two options it abbreviates)' '\n '\n \n cat >typo.err <<\\EOF\n-error: did you mean `--boolean` (with two dashes ?)\n+error: did you mean `--boolean` (with two dashes?)\n EOF\n \n test_expect_success 'detect possible typos' '\n@@ -232,7 +232,7 @@ test_expect_success 'detect possible typos' '\n '\n \n cat >typo.err <<\\EOF\n-error: did you mean `--ambiguous` (with two dashes ?)\n+error: did you mean `--ambiguous` (with two dashes?)\n EOF\n \n test_expect_success 'detect possible typos' '\n\n--\nhttps://github.com/git/git/pull/540\n"},{"id":"360546","messageId":"20181015172041.GC1301@sigill.intra.peff.net","threadId":"49561","inReplyTo":"01020166741c381f-bd183f7f-725d-4b4f-9f5f-804560b2b00b-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] Typo `dashes ?` -> `dashes?`","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-10-15T17:20:41Z","receivedAt":"2018-10-15T17:20:45Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Oct 14, 2018 at 07:44:58PM +0000, Jacques Bodin-Hullin wrote:\n\n> diff --git a/parse-options.c b/parse-options.c\n> index 3b874a83a0c89..88512212392ae 100644\n> --- a/parse-options.c\n> +++ b/parse-options.c\n> @@ -352,7 +352,7 @@ static void check_typos(const char *arg, const struct option *options)\n>  \t\treturn;\n>  \n>  \tif (starts_with(arg, \"no-\")) {\n> -\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n> +\t\terror (\"did you mean `--%s` (with two dashes?)\", arg);\n\nI agree the extra space in the original is stylistically weird, and your\nsuggestion is an improvement. However, I think this is really a question\n\"did you mean...\" with a parenthetical phrase. Most style guides would\nrecommend putting the punctuation outside, like:\n\n  error: did you mean `--foo` (with two dashes)?\n\nSpeaking of style, the extra space between \"error\" and \"(\" does not\nmatch our usual coding style. It might be worth removing while we're\ntouching these lines.\n\n-Peff\n"},{"id":"360729","messageId":"20181017082321.GA31932@sigill.intra.peff.net","threadId":"49561","inReplyTo":"CAAwZSqAk+D-6y9ArT_tAychwLnNUANinLPYX-ciXJDmyv+J7FA@mail.gmail.com","subject":"Re: [PATCH] Typo `dashes ?` -> `dashes?`","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-10-17T08:23:22Z","receivedAt":"2018-10-17T08:23:26Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Oct 15, 2018 at 09:31:54PM +0200, Jacques Bodin-Hullin wrote:\n\n> I've just updated the PR with the `error(` change.\n> \n> Also I did the change for the question mark at the end, because you are\n> right, when we read it, it sounds better.\n> \n> Do I need to put back the patch in this thread? It's here:\n> https://patch-diff.githubusercontent.com/raw/git/git/pull/540.patch\n\nThe commit looks good, though you may want to expand the commit message\na little (it's not really a typo, but more of a style fix).\n\nThe next step would normally be to send the patch to the list (ideally\nin this thread), with \"[PATCH v2]\" in the subject.\n\nIt looks like you're using SubmitGit. I don't remember offhand how it\nworks for sending re-rolls like this, but I think it's possible. If you\nrun into trouble, you might try instead using GitGitGadget, which is a\nsimilar PR->mail gateway that is a little more featureful:\n\n  https://github.com/gitgitgadget/gitgitgadget\n\n-Peff\n"},{"id":"363539","messageId":"010201671ebf523a-da55f2d8-876a-4b3b-a6fe-29d790bed2c1-000000@eu-west-1.amazonses.com","threadId":"49561","inReplyTo":"01020166741c381f-bd183f7f-725d-4b4f-9f5f-804560b2b00b-000000@eu-west-1.amazonses.com","subject":"[PATCH-2] Change writing style","fromName":"Jacques Bodin-Hullin","fromEmail":"j.bodinhullin@monsieurbiz.com","sentAt":"2018-11-16T22:58:34Z","receivedAt":"2018-11-16T22:58:37Z","isPatch":true,"sender":{"key":"j.bodinhullin@monsieurbiz.com","avatar":"https://avatars.githubusercontent.com/u/858611?v=4"},"body":"---\n parse-options.c          | 4 ++--\n t/t0040-parse-options.sh | 4 ++--\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/parse-options.c b/parse-options.c\nindex 3b874a83a0c89..f5ef24155950b 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -352,7 +352,7 @@ static void check_typos(const char *arg, const struct option *options)\n \t\treturn;\n \n \tif (starts_with(arg, \"no-\")) {\n-\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n+\t\terror(\"did you mean `--%s` (with two dashes)?\", arg);\n \t\texit(129);\n \t}\n \n@@ -360,7 +360,7 @@ static void check_typos(const char *arg, const struct option *options)\n \t\tif (!options->long_name)\n \t\t\tcontinue;\n \t\tif (starts_with(options->long_name, arg)) {\n-\t\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n+\t\t\terror(\"did you mean `--%s` (with two dashes)?\", arg);\n \t\t\texit(129);\n \t\t}\n \t}\ndiff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\nindex 5b0560fa20e34..c442f9ae15ff8 100755\n--- a/t/t0040-parse-options.sh\n+++ b/t/t0040-parse-options.sh\n@@ -222,7 +222,7 @@ test_expect_success 'non ambiguous option (after two options it abbreviates)' '\n '\n \n cat >typo.err <<\\EOF\n-error: did you mean `--boolean` (with two dashes ?)\n+error: did you mean `--boolean` (with two dashes)?\n EOF\n \n test_expect_success 'detect possible typos' '\n@@ -232,7 +232,7 @@ test_expect_success 'detect possible typos' '\n '\n \n cat >typo.err <<\\EOF\n-error: did you mean `--ambiguous` (with two dashes ?)\n+error: did you mean `--ambiguous` (with two dashes)?\n EOF\n \n test_expect_success 'detect possible typos' '\n\n--\nhttps://github.com/git/git/pull/540\n"},{"id":"363548","messageId":"xmqqtvkggjna.fsf@gitster-ct.c.googlers.com","threadId":"49561","inReplyTo":"010201671ebf523a-da55f2d8-876a-4b3b-a6fe-29d790bed2c1-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH-2] Change writing style","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-11-17T09:04:09Z","receivedAt":"2018-11-17T09:04:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com> writes:\n\n> Subject: Re: [PATCH-2] Change writing style\n\nLet's do the usual \"<area>: summary\" instead.  Perhaps\n\n    Subject: parse-options: lose an unnecessary space in an error message\n\nIt is obvious why it is done, so I do not see a need for any other\ndescription in the body of the message for this change.\n\nWe still need the patch signed-off.  cf. Documentation/SubmittingPatches\n\n> ---\n>  parse-options.c          | 4 ++--\n>  t/t0040-parse-options.sh | 4 ++--\n>  2 files changed, 4 insertions(+), 4 deletions(-)\n\nAll changes look good to me.\n\n\n> diff --git a/parse-options.c b/parse-options.c\n> index 3b874a83a0c89..f5ef24155950b 100644\n> --- a/parse-options.c\n> +++ b/parse-options.c\n> @@ -352,7 +352,7 @@ static void check_typos(const char *arg, const struct option *options)\n>  \t\treturn;\n>  \n>  \tif (starts_with(arg, \"no-\")) {\n> -\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n> +\t\terror(\"did you mean `--%s` (with two dashes)?\", arg);\n>  \t\texit(129);\n>  \t}\n>  \n> @@ -360,7 +360,7 @@ static void check_typos(const char *arg, const struct option *options)\n>  \t\tif (!options->long_name)\n>  \t\t\tcontinue;\n>  \t\tif (starts_with(options->long_name, arg)) {\n> -\t\t\terror (\"did you mean `--%s` (with two dashes ?)\", arg);\n> +\t\t\terror(\"did you mean `--%s` (with two dashes)?\", arg);\n>  \t\t\texit(129);\n>  \t\t}\n>  \t}\n> diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\n> index 5b0560fa20e34..c442f9ae15ff8 100755\n> --- a/t/t0040-parse-options.sh\n> +++ b/t/t0040-parse-options.sh\n> @@ -222,7 +222,7 @@ test_expect_success 'non ambiguous option (after two options it abbreviates)' '\n>  '\n>  \n>  cat >typo.err <<\\EOF\n> -error: did you mean `--boolean` (with two dashes ?)\n> +error: did you mean `--boolean` (with two dashes)?\n>  EOF\n>  \n>  test_expect_success 'detect possible typos' '\n> @@ -232,7 +232,7 @@ test_expect_success 'detect possible typos' '\n>  '\n>  \n>  cat >typo.err <<\\EOF\n> -error: did you mean `--ambiguous` (with two dashes ?)\n> +error: did you mean `--ambiguous` (with two dashes)?\n>  EOF\n>  \n>  test_expect_success 'detect possible typos' '\n>\n> --\n> https://github.com/git/git/pull/540\n"},{"id":"391164","messageId":"0102017015765b98-e2e26f61-dd07-4a32-a72f-2d7b2159fffe-000000@eu-west-1.amazonses.com","threadId":"49561","inReplyTo":"010201671ebf523a-da55f2d8-876a-4b3b-a6fe-29d790bed2c1-000000@eu-west-1.amazonses.com","subject":"[PATCH] parse-options: lose an unnecessary space in an error message","fromName":"Jacques Bodin-Hullin","fromEmail":"j.bodinhullin@monsieurbiz.com","sentAt":"2020-02-05T13:07:23Z","receivedAt":"2020-02-05T13:07:27Z","isPatch":true,"sender":{"key":"j.bodinhullin@monsieurbiz.com","avatar":"https://avatars.githubusercontent.com/u/858611?v=4"},"body":"Signed-off-by: Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com>\n---\n parse-options.c          | 4 ++--\n t/t0040-parse-options.sh | 4 ++--\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/parse-options.c b/parse-options.c\nindex b42f54d48b96c..71dbe84d896b4 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -420,7 +420,7 @@ static void check_typos(const char *arg, const struct option *options)\n \t\treturn;\n \n \tif (starts_with(arg, \"no-\")) {\n-\t\terror(_(\"did you mean `--%s` (with two dashes ?)\"), arg);\n+\t\terror(_(\"did you mean `--%s` (with two dashes)?\"), arg);\n \t\texit(129);\n \t}\n \n@@ -428,7 +428,7 @@ static void check_typos(const char *arg, const struct option *options)\n \t\tif (!options->long_name)\n \t\t\tcontinue;\n \t\tif (starts_with(options->long_name, arg)) {\n-\t\t\terror(_(\"did you mean `--%s` (with two dashes ?)\"), arg);\n+\t\t\terror(_(\"did you mean `--%s` (with two dashes)?\"), arg);\n \t\t\texit(129);\n \t\t}\n \t}\ndiff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\nindex 705a136ed92c9..9d7c7fdaa2af1 100755\n--- a/t/t0040-parse-options.sh\n+++ b/t/t0040-parse-options.sh\n@@ -242,7 +242,7 @@ test_expect_success 'Alias options do not contribute to abbreviation' '\n '\n \n cat >typo.err <<\\EOF\n-error: did you mean `--boolean` (with two dashes ?)\n+error: did you mean `--boolean` (with two dashes)?\n EOF\n \n test_expect_success 'detect possible typos' '\n@@ -252,7 +252,7 @@ test_expect_success 'detect possible typos' '\n '\n \n cat >typo.err <<\\EOF\n-error: did you mean `--ambiguous` (with two dashes ?)\n+error: did you mean `--ambiguous` (with two dashes)?\n EOF\n \n test_expect_success 'detect possible typos' '\n\n--\nhttps://github.com/git/git/pull/540\n"},{"id":"391182","messageId":"xmqqv9ok6fa1.fsf@gitster-ct.c.googlers.com","threadId":"49561","inReplyTo":"0102017015765b98-e2e26f61-dd07-4a32-a72f-2d7b2159fffe-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] parse-options: lose an unnecessary space in an error message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-02-05T18:49:10Z","receivedAt":"2020-02-05T18:49:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com> writes:\n\n> Signed-off-by: Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com>\n> ---\n>  parse-options.c          | 4 ++--\n>  t/t0040-parse-options.sh | 4 ++--\n>  2 files changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/parse-options.c b/parse-options.c\n> index b42f54d48b96c..71dbe84d896b4 100644\n> --- a/parse-options.c\n> +++ b/parse-options.c\n> @@ -420,7 +420,7 @@ static void check_typos(const char *arg, const struct option *options)\n>  \t\treturn;\n>  \n>  \tif (starts_with(arg, \"no-\")) {\n> -\t\terror(_(\"did you mean `--%s` (with two dashes ?)\"), arg);\n> +\t\terror(_(\"did you mean `--%s` (with two dashes)?\"), arg);\n\nMakes sense.  Not just there is an extra SP before the question\nmark, the question mark is about the whole sentence, so pushing\nit out of the parentheses also is a good change.\n\nWe might even want to lose the parentheses altogether, i.e.\n\n\tdid you mean `--%s` with two dashes?\n\nHmm?\n\nThanks.\n"},{"id":"391190","messageId":"CAAwZSqCN9WShN4e-0i1Q0CwonPda_bysGjwyQcQC6-JC_U_KTg@mail.gmail.com","threadId":"49561","inReplyTo":"xmqqv9ok6fa1.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] parse-options: lose an unnecessary space in an error message","fromName":"Jacques Bodin-Hullin","fromEmail":"j.bodinhullin@monsieurbiz.com","sentAt":"2020-02-05T20:11:09Z","receivedAt":"2020-02-05T20:11:50Z","isPatch":true,"sender":{"key":"j.bodinhullin@monsieurbiz.com","avatar":"https://avatars.githubusercontent.com/u/858611?v=4"},"body":"Hi,\n\nActually I prefer to keep the parentheses, it makes better sense to me.\nIt feels correct with them when I speak it loudly, incorrect without.\n\nBR,\n\nJacques\n\n-- \nMonsieur Biz\n@jacquesbh\n+33 (0)6 75 54 11 97\nGPG : https://keybase.io/jacquesbh\n\n\nLe mer. 5 févr. 2020 à 19:49, Junio C Hamano <gitster@pobox.com> a écrit :\n>\n> Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com> writes:\n>\n> > Signed-off-by: Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com>\n> > ---\n> >  parse-options.c          | 4 ++--\n> >  t/t0040-parse-options.sh | 4 ++--\n> >  2 files changed, 4 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/parse-options.c b/parse-options.c\n> > index b42f54d48b96c..71dbe84d896b4 100644\n> > --- a/parse-options.c\n> > +++ b/parse-options.c\n> > @@ -420,7 +420,7 @@ static void check_typos(const char *arg, const struct option *options)\n> >               return;\n> >\n> >       if (starts_with(arg, \"no-\")) {\n> > -             error(_(\"did you mean `--%s` (with two dashes ?)\"), arg);\n> > +             error(_(\"did you mean `--%s` (with two dashes)?\"), arg);\n>\n> Makes sense.  Not just there is an extra SP before the question\n> mark, the question mark is about the whole sentence, so pushing\n> it out of the parentheses also is a good change.\n>\n> We might even want to lose the parentheses altogether, i.e.\n>\n>         did you mean `--%s` with two dashes?\n>\n> Hmm?\n>\n> Thanks.\n"}]}