{"thread":{"id":"56564","subject":"[PATCH] rev-parse: fix mismatch quoting of separator in the message","startedAt":"2021-09-22T11:18:11Z","lastAt":"2021-09-22T20:58:29Z","messageCount":7,"participants":["Bagas Sanjaya","Taylor Blau","Junio C Hamano","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"436715","messageId":"20210922111744.675326-1-bagasdotme@gmail.com","threadId":"56564","inReplyTo":null,"subject":"[PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-09-22T11:17:45Z","receivedAt":"2021-09-22T11:18:11Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"There is a quoting mismatch quoting `--` separator in \"no usage string\ngiven....\" message (`' instead of ``). Fix it.\n\nSigned-off-by: Bagas Sanjaya <bagasdotme@gmail.com>\n---\n builtin/rev-parse.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/rev-parse.c b/builtin/rev-parse.c\nindex 22c4e1a4ff..a35dbad6c4 100644\n--- a/builtin/rev-parse.c\n+++ b/builtin/rev-parse.c\n@@ -439,7 +439,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)\n \t\tALLOC_GROW(usage, unb + 1, usz);\n \t\tif (!strcmp(\"--\", sb.buf)) {\n \t\t\tif (unb < 1)\n-\t\t\t\tdie(_(\"no usage string given before the `--' separator\"));\n+\t\t\t\tdie(_(\"no usage string given before the `--` separator\"));\n \t\t\tusage[unb] = NULL;\n \t\t\tbreak;\n \t\t}\n\nbase-commit: 99c99ed8259bf070cd8ae7b51a94904b7cf5c161\n-- \n2.25.1\n\n"},{"id":"436741","messageId":"YUtqp+1Mwl2v0kuh@nand.local","threadId":"56564","inReplyTo":"20210922111744.675326-1-bagasdotme@gmail.com","subject":"Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2021-09-22T17:40:55Z","receivedAt":"2021-09-22T17:40:59Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote:\n> There is a quoting mismatch quoting `--` separator in \"no usage string\n> given....\" message (`' instead of ``). Fix it.\n\nFor what it's worth, I think that the `' style is typographic, since the\npair look like English \"smart quotes\" (as opposed to straight quotes). I\nhave no opinion about which is better, but I don't think the pre-image\nwas necessarily a mistake.\n\nThanks,\nTaylor\n"},{"id":"436760","messageId":"xmqqzgs45s15.fsf@gitster.g","threadId":"56564","inReplyTo":"YUtqp+1Mwl2v0kuh@nand.local","subject":"Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-09-22T19:28:22Z","receivedAt":"2021-09-22T19:28:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n> On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote:\n>> There is a quoting mismatch quoting `--` separator in \"no usage string\n>> given....\" message (`' instead of ``). Fix it.\n>\n> For what it's worth, I think that the `' style is typographic, since the\n> pair look like English \"smart quotes\" (as opposed to straight quotes). I\n> have no opinion about which is better, but I don't think the pre-image\n> was necessarily a mistake.\n\nI thought that we try to avoid \"smart quotes\" in our messages.\n\nAnd we do not expect our users to be expecting to read their error\nmessages in markdown, so `--` is not a \"Fix\", either (do we have\nmany instances of such uses of backticks in messages already?).\n\nLet's just stick to the true and tried pair of single quotes here.\n\nThanks.\n"},{"id":"436762","messageId":"YUuHP41V9m7cIEBL@nand.local","threadId":"56564","inReplyTo":"xmqqzgs45s15.fsf@gitster.g","subject":"Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2021-09-22T19:42:55Z","receivedAt":"2021-09-22T19:43:06Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Sep 22, 2021 at 12:28:22PM -0700, Junio C Hamano wrote:\n> Taylor Blau <me@ttaylorr.com> writes:\n>\n> > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote:\n> >> There is a quoting mismatch quoting `--` separator in \"no usage string\n> >> given....\" message (`' instead of ``). Fix it.\n> >\n> > For what it's worth, I think that the `' style is typographic, since the\n> > pair look like English \"smart quotes\" (as opposed to straight quotes). I\n> > have no opinion about which is better, but I don't think the pre-image\n> > was necessarily a mistake.\n>\n> I thought that we try to avoid \"smart quotes\" in our messages.\n\nI think UTF-8 smart quotes are generally frowned upon in source code,\nbut I didn't think we had any hard-and-fast rule about whether to prefer\n'this' to `that' (for what it's worth, I prefer the former and it seems\nto be more common).\n\n> And we do not expect our users to be expecting to read their error\n> messages in markdown, so `--` is not a \"Fix\", either (do we have\n> many instances of such uses of backticks in messages already?).\n\nThere are many in code comments, but I could only find a handful in\nerror messages or the description of command-line flags.\n\nThanks,\nTaylor\n"},{"id":"436766","messageId":"87bl4k7532.fsf@evledraar.gmail.com","threadId":"56564","inReplyTo":"YUuHP41V9m7cIEBL@nand.local","subject":"Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-09-22T19:59:51Z","receivedAt":"2021-09-22T20:01:30Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Sep 22 2021, Taylor Blau wrote:\n\n> On Wed, Sep 22, 2021 at 12:28:22PM -0700, Junio C Hamano wrote:\n>> Taylor Blau <me@ttaylorr.com> writes:\n>>\n>> > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote:\n>> >> There is a quoting mismatch quoting `--` separator in \"no usage string\n>> >> given....\" message (`' instead of ``). Fix it.\n>> >\n>> > For what it's worth, I think that the `' style is typographic, since the\n>> > pair look like English \"smart quotes\" (as opposed to straight quotes). I\n>> > have no opinion about which is better, but I don't think the pre-image\n>> > was necessarily a mistake.\n>>\n>> I thought that we try to avoid \"smart quotes\" in our messages.\n>\n> I think UTF-8 smart quotes are generally frowned upon in source code,\n> but I didn't think we had any hard-and-fast rule about whether to prefer\n> 'this' to `that' (for what it's worth, I prefer the former and it seems\n> to be more common).\n\nNo comment on what's preferred, other than I wish we'd pick a style and\nstick to it. Just a note that this used to be the way to do it in\ne.g. the GNU guidelines, I see it isn't anymore though: [1].\n\n1. https://www.gnu.org/prep/standards/standards.html#Quote-Characters-1\n"},{"id":"436769","messageId":"YUuNOcqClVjQamYh@nand.local","threadId":"56564","inReplyTo":"87bl4k7532.fsf@evledraar.gmail.com","subject":"Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2021-09-22T20:08:25Z","receivedAt":"2021-09-22T20:10:36Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Sep 22, 2021 at 09:59:51PM +0200, Ævar Arnfjörð Bjarmason wrote:\n>\n> On Wed, Sep 22 2021, Taylor Blau wrote:\n>\n> > On Wed, Sep 22, 2021 at 12:28:22PM -0700, Junio C Hamano wrote:\n> >> Taylor Blau <me@ttaylorr.com> writes:\n> >>\n> >> > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote:\n> >> >> There is a quoting mismatch quoting `--` separator in \"no usage string\n> >> >> given....\" message (`' instead of ``). Fix it.\n> >> >\n> >> > For what it's worth, I think that the `' style is typographic, since the\n> >> > pair look like English \"smart quotes\" (as opposed to straight quotes). I\n> >> > have no opinion about which is better, but I don't think the pre-image\n> >> > was necessarily a mistake.\n> >>\n> >> I thought that we try to avoid \"smart quotes\" in our messages.\n> >\n> > I think UTF-8 smart quotes are generally frowned upon in source code,\n> > but I didn't think we had any hard-and-fast rule about whether to prefer\n> > 'this' to `that' (for what it's worth, I prefer the former and it seems\n> > to be more common).\n>\n> No comment on what's preferred, other than I wish we'd pick a style and\n> stick to it. Just a note that this used to be the way to do it in\n> e.g. the GNU guidelines, I see it isn't anymore though: [1].\n\nI agree. But for what it's worth, I think we should:\n\n  - accept patches, such as this one, which move things in a positive\n    direction\n\n  - not spend a ton of time or reviewer bandwidth on conversions\n    throughout the tree\n\nIn other words, I'm happy to see patches like this, or little clean-ups\nalong the way in related areas, but I would be unhappy to see a massive\npatch to change all instances from one to the other.\n\n> 1. https://www.gnu.org/prep/standards/standards.html#Quote-Characters-1\n\nThanks,\nTaylor\n"},{"id":"436781","messageId":"xmqqfstw5nv2.fsf@gitster.g","threadId":"56564","inReplyTo":"YUuNOcqClVjQamYh@nand.local","subject":"Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-09-22T20:58:25Z","receivedAt":"2021-09-22T20:58:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n> I agree. But for what it's worth, I think we should:\n>\n>   - accept patches, such as this one, which move things in a positive\n>     direction\n>\n>   - not spend a ton of time or reviewer bandwidth on conversions\n>     throughout the tree\n>\n> In other words, I'm happy to see patches like this, or little clean-ups\n> along the way in related areas, but I would be unhappy to see a massive\n> patch to change all instances from one to the other.\n\nOh, absolutely.  But let's not accept a small patch that swaps one\nbad style `--' to another bad one `--`, which does not improve\nanything.\n\n"}]}