rev-parse: fix mismatch quoting of separator in the message
PATCH 1/1 rev-parse: fix mismatch quoting of separator in the message
There is a quoting mismatch quoting -- separator in "no usage string given...." message (`' instead of ``). Fix it.
--- builtin/rev-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/rev-parse.c +1 -1
@@ -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
Signature · 1 line
2.25.1
Quoted 2 lines · Bagas Sanjaya
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
Quoted 8 lines · Taylor Blau
Quoted 2 lines · Bagas Sanjaya
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.
Quoted 6 lines · Junio C Hamano
Quoted 4 lines · Taylor Blau
Quoted 2 lines · Bagas Sanjaya
There is a quoting mismatch quoting
--separator in "no usage string given...." message (`' instead of ``). Fix it.
Quoted 6 lines
Quoted 4 lines
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).
Quoted 3 lines
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
Quoted 12 lines · Taylor Blau
Quoted 11 lines · Junio C Hamano
Quoted 8 lines · Taylor Blau
Quoted 2 lines · Bagas Sanjaya
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.
Quoted 6 lines
Quoted 1 line
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
Quoted 17 lines · Ævar Arnfjörð Bjarmason
Quoted 14 lines · Taylor Blau
Quoted 12 lines · Junio C Hamano
Quoted 8 lines · Taylor Blau
Quoted 2 lines · Bagas Sanjaya
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.
Quoted 8 lines
Quoted 4 lines
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.
Thanks,
Taylor
Quoted 11 lines · Taylor Blau
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.