* [PATCH] rev-parse: fix mismatch quoting of separator in the message @ 2021-09-22 11:17 Bagas Sanjaya 2021-09-22 17:40 ` Taylor Blau 0 siblings, 1 reply; 7+ messages in thread From: Bagas Sanjaya @ 2021-09-22 11:17 UTC (permalink / raw) To: git; +Cc: wolf, Bagas Sanjaya There is a quoting mismatch quoting `--` separator in "no usage string given...." message (`' instead of ``). Fix it. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> --- builtin/rev-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 22c4e1a4ff..a35dbad6c4 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -439,7 +439,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix) ALLOC_GROW(usage, unb + 1, usz); if (!strcmp("--", sb.buf)) { if (unb < 1) - die(_("no usage string given before the `--' separator")); + die(_("no usage string given before the `--` separator")); usage[unb] = NULL; break; } base-commit: 99c99ed8259bf070cd8ae7b51a94904b7cf5c161 -- 2.25.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message 2021-09-22 11:17 [PATCH] rev-parse: fix mismatch quoting of separator in the message Bagas Sanjaya @ 2021-09-22 17:40 ` Taylor Blau 2021-09-22 19:28 ` Junio C Hamano 0 siblings, 1 reply; 7+ messages in thread From: Taylor Blau @ 2021-09-22 17:40 UTC (permalink / raw) To: Bagas Sanjaya; +Cc: git, wolf On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote: > There is a quoting mismatch quoting `--` separator in "no usage string > given...." message (`' instead of ``). Fix it. For what it's worth, I think that the `' style is typographic, since the pair look like English "smart quotes" (as opposed to straight quotes). I have no opinion about which is better, but I don't think the pre-image was necessarily a mistake. Thanks, Taylor ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message 2021-09-22 17:40 ` Taylor Blau @ 2021-09-22 19:28 ` Junio C Hamano 2021-09-22 19:42 ` Taylor Blau 0 siblings, 1 reply; 7+ messages in thread From: Junio C Hamano @ 2021-09-22 19:28 UTC (permalink / raw) To: Taylor Blau; +Cc: Bagas Sanjaya, git, wolf Taylor Blau <me@ttaylorr.com> writes: > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote: >> There is a quoting mismatch quoting `--` separator in "no usage string >> given...." message (`' instead of ``). Fix it. > > For what it's worth, I think that the `' style is typographic, since the > pair look like English "smart quotes" (as opposed to straight quotes). I > have no opinion about which is better, but I don't think the pre-image > was necessarily a mistake. I thought that we try to avoid "smart quotes" in our messages. And we do not expect our users to be expecting to read their error messages in markdown, so `--` is not a "Fix", either (do we have many instances of such uses of backticks in messages already?). Let's just stick to the true and tried pair of single quotes here. Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message 2021-09-22 19:28 ` Junio C Hamano @ 2021-09-22 19:42 ` Taylor Blau 2021-09-22 19:59 ` Ævar Arnfjörð Bjarmason 0 siblings, 1 reply; 7+ messages in thread From: Taylor Blau @ 2021-09-22 19:42 UTC (permalink / raw) To: Junio C Hamano; +Cc: Taylor Blau, Bagas Sanjaya, git, wolf On Wed, Sep 22, 2021 at 12:28:22PM -0700, Junio C Hamano wrote: > Taylor Blau <me@ttaylorr.com> writes: > > > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote: > >> There is a quoting mismatch quoting `--` separator in "no usage string > >> given...." message (`' instead of ``). Fix it. > > > > For what it's worth, I think that the `' style is typographic, since the > > pair look like English "smart quotes" (as opposed to straight quotes). I > > have no opinion about which is better, but I don't think the pre-image > > was necessarily a mistake. > > I thought that we try to avoid "smart quotes" in our messages. I think UTF-8 smart quotes are generally frowned upon in source code, but I didn't think we had any hard-and-fast rule about whether to prefer 'this' to `that' (for what it's worth, I prefer the former and it seems to be more common). > And we do not expect our users to be expecting to read their error > messages in markdown, so `--` is not a "Fix", either (do we have > many instances of such uses of backticks in messages already?). There are many in code comments, but I could only find a handful in error messages or the description of command-line flags. Thanks, Taylor ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message 2021-09-22 19:42 ` Taylor Blau @ 2021-09-22 19:59 ` Ævar Arnfjörð Bjarmason 2021-09-22 20:08 ` Taylor Blau 0 siblings, 1 reply; 7+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2021-09-22 19:59 UTC (permalink / raw) To: Taylor Blau; +Cc: Junio C Hamano, Bagas Sanjaya, git, wolf On Wed, Sep 22 2021, Taylor Blau wrote: > On Wed, Sep 22, 2021 at 12:28:22PM -0700, Junio C Hamano wrote: >> Taylor Blau <me@ttaylorr.com> writes: >> >> > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote: >> >> There is a quoting mismatch quoting `--` separator in "no usage string >> >> given...." message (`' instead of ``). Fix it. >> > >> > For what it's worth, I think that the `' style is typographic, since the >> > pair look like English "smart quotes" (as opposed to straight quotes). I >> > have no opinion about which is better, but I don't think the pre-image >> > was necessarily a mistake. >> >> I thought that we try to avoid "smart quotes" in our messages. > > I think UTF-8 smart quotes are generally frowned upon in source code, > but I didn't think we had any hard-and-fast rule about whether to prefer > 'this' to `that' (for what it's worth, I prefer the former and it seems > to be more common). No comment on what's preferred, other than I wish we'd pick a style and stick to it. Just a note that this used to be the way to do it in e.g. the GNU guidelines, I see it isn't anymore though: [1]. 1. https://www.gnu.org/prep/standards/standards.html#Quote-Characters-1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message 2021-09-22 19:59 ` Ævar Arnfjörð Bjarmason @ 2021-09-22 20:08 ` Taylor Blau 2021-09-22 20:58 ` Junio C Hamano 0 siblings, 1 reply; 7+ messages in thread From: Taylor Blau @ 2021-09-22 20:08 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason Cc: Taylor Blau, Junio C Hamano, Bagas Sanjaya, git, wolf On Wed, Sep 22, 2021 at 09:59:51PM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Sep 22 2021, Taylor Blau wrote: > > > On Wed, Sep 22, 2021 at 12:28:22PM -0700, Junio C Hamano wrote: > >> Taylor Blau <me@ttaylorr.com> writes: > >> > >> > On Wed, Sep 22, 2021 at 06:17:45PM +0700, Bagas Sanjaya wrote: > >> >> There is a quoting mismatch quoting `--` separator in "no usage string > >> >> given...." message (`' instead of ``). Fix it. > >> > > >> > For what it's worth, I think that the `' style is typographic, since the > >> > pair look like English "smart quotes" (as opposed to straight quotes). I > >> > have no opinion about which is better, but I don't think the pre-image > >> > was necessarily a mistake. > >> > >> I thought that we try to avoid "smart quotes" in our messages. > > > > I think UTF-8 smart quotes are generally frowned upon in source code, > > but I didn't think we had any hard-and-fast rule about whether to prefer > > 'this' to `that' (for what it's worth, I prefer the former and it seems > > to be more common). > > No comment on what's preferred, other than I wish we'd pick a style and > stick to it. Just a note that this used to be the way to do it in > e.g. the GNU guidelines, I see it isn't anymore though: [1]. I agree. But for what it's worth, I think we should: - accept patches, such as this one, which move things in a positive direction - not spend a ton of time or reviewer bandwidth on conversions throughout the tree In other words, I'm happy to see patches like this, or little clean-ups along the way in related areas, but I would be unhappy to see a massive patch to change all instances from one to the other. > 1. https://www.gnu.org/prep/standards/standards.html#Quote-Characters-1 Thanks, Taylor ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rev-parse: fix mismatch quoting of separator in the message 2021-09-22 20:08 ` Taylor Blau @ 2021-09-22 20:58 ` Junio C Hamano 0 siblings, 0 replies; 7+ messages in thread From: Junio C Hamano @ 2021-09-22 20:58 UTC (permalink / raw) To: Taylor Blau Cc: Ævar Arnfjörð Bjarmason, Bagas Sanjaya, git, wolf Taylor Blau <me@ttaylorr.com> writes: > I agree. But for what it's worth, I think we should: > > - accept patches, such as this one, which move things in a positive > direction > > - not spend a ton of time or reviewer bandwidth on conversions > throughout the tree > > In other words, I'm happy to see patches like this, or little clean-ups > along the way in related areas, but I would be unhappy to see a massive > patch to change all instances from one to the other. Oh, absolutely. But let's not accept a small patch that swaps one bad style `--' to another bad one `--`, which does not improve anything. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-22 20:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-22 11:17 [PATCH] rev-parse: fix mismatch quoting of separator in the message Bagas Sanjaya 2021-09-22 17:40 ` Taylor Blau 2021-09-22 19:28 ` Junio C Hamano 2021-09-22 19:42 ` Taylor Blau 2021-09-22 19:59 ` Ævar Arnfjörð Bjarmason 2021-09-22 20:08 ` Taylor Blau 2021-09-22 20:58 ` Junio C Hamano
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.