SubmittingPatches: Cite the 50 char subject limit
PATCH 1/1 SubmittingPatches: Cite the 50 char subject limit
Change the SubmittingPatches recommendations to mention the 50 character soft limit on patch subject lines. 50 characters is the soft limit mentioned in git-commit(1) and gittutorial(7), it's also the point at which Gitweb, GitHub and various other Git front ends start abbreviating the commit message.
--- Documentation/SubmittingPatches | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Documentation/SubmittingPatches +2 -1
@@ -7,7 +7,8 @@ Checklist (and a short version for the impatient): before committing - do not check in commented out code or unneeded files - the first line of the commit message should be a short - description and should skip the full stop + description (50 characters is the soft limit, see DISCUSSION + in git-commit(1)), and should skip the full stop - the body should provide a meaningful commit message, which: - uses the imperative, present tense: "change", not "changed" or "changes".
Signature · 1 line
1.7.0.4
Quoted 5 lines · Ævar Arnfjörð Bjarmason
Change the SubmittingPatches recommendations to mention the 50 character soft limit on patch subject lines. 50 characters is the soft limit mentioned in git-commit(1) and gittutorial(7), it's also the point at which Gitweb, GitHub and various other Git front ends start abbreviating the commit message.
Hmph, we probably would want to do s/50 character/&s/ in the two manual pages. I do not think if anybody is ready to stand behind the specific number "50", and we can bikeshed about it separately.
The spirit of having a soft limit is twofold:
- It should fit on "git log --oneline" comfortably;
- If your change is too complex to be summarized in such a short sentence, you probably are doing too many things in one commit.
The first does not justify "50" any better than other arbitrary limit, but with things like --graph and --source, anything longer makes the resulting output very close to the edge of an 80-column terminal.
The second does not justify "50" either, as your language may be verbose or terse (e.g. Japanese can cram far more information in a 140-char tweet than somebody writing in English), but it is a more important one between the two rationales above.
Quoted 10 lines · Junio C Hamano
Quoted 5 lines · Ævar Arnfjörð Bjarmason
Change the SubmittingPatches recommendations to mention the 50 character soft limit on patch subject lines. 50 characters is the soft limit mentioned in git-commit(1) and gittutorial(7), it's also the point at which Gitweb, GitHub and various other Git front ends start abbreviating the commit message.
Hmph, we probably would want to do s/50 character/&s/ in the two manual pages.
I'm not sure if "with a single short (less than 50 character) line" is is grammatically correct with "characters", since "characters line" wouldn't make sense.
On the other hand that sentence violates the rule that when you put something in parens your sentence should still make sense with s/[()]//g, "a single short less than 50 character line" is pushing it.
I do not think if anybody is ready to stand behind the specific
Quoted 9 lines
number "50", and we can bikeshed about it separately.
The spirit of having a soft limit is twofold:
- It should fit on "git log --oneline" comfortably;
- If your change is too complex to be summarized in such a short sentence, you probably are doing too many things in one commit.
Quoted 8 lines
The first does not justify "50" any better than other arbitrary limit, but with things like --graph and --source, anything longer makes the resulting output very close to the edge of an 80-column terminal.
The second does not justify "50" either, as your language may be verbose or terse (e.g. Japanese can cram far more information in a 140-char tweet than somebody writing in English), but it is a more important one between the two rationales above.
Right, 50 characters isn't magical. But I find it to be a really good indicator that I'm going over the limit.
When I want to write something that's 60 characters or more that's usually a sign that I should simplify the subject and just write a more detailed body.
50 also fits neatly into interfaces where you want the summary and 2-3 other things on the page. Like in the Gitweb or Github interfaces.
Quoted 7 lines · Ævar Arnfjörð Bjarmason
Quoted 3 lines · Junio C Hamano
Hmph, we probably would want to do s/50 character/&s/ in the two manual
pages.
Quoted 7 lines
I'm not sure if "with a single short (less than 50 character) line" is is grammatically correct with "characters", since "characters line" wouldn't make sense.
On the other hand that sentence violates the rule that when you put something in parens your sentence should still make sense with s/[()]//g, "a single short less than 50 character line" is pushing it.
If the number of characters is less than 50, then there are fewer than 50 characters.
This is a short line of fewer than 50 characters.
Cheers,
Josh
Quoted 11 lines · Joshua Juran
Quoted 9 lines · Ævar Arnfjörð Bjarmason
Quoted 2 lines · Junio C Hamano
Hmph, we probably would want to do s/50 character/&s/ in the two manual pages.
I'm not sure if "with a single short (less than 50 character) line" is is grammatically correct with "characters", since "characters line" wouldn't make sense.
Quoted 8 lines
Quoted 3 lines
On the other hand that sentence violates the rule that when you put something in parens your sentence should still make sense with s/[()]//g, "a single short less than 50 character line" is pushing it.
If the number of characters is less than 50, then there are fewer than 50 characters.
This is a short line of fewer than 50 characters.
I don't understand the context of that remark or what you're replying to.
I meant that I found the "single short (less than 50 character) line" bit in git-commit.txt, gittutorial.txt and user-manual.txt odd to read.
What did you mean?
Quoted 15 lines · Ævar Arnfjörð Bjarmason
Quoted 14 lines · Joshua Juran
Quoted 12 lines · Ævar Arnfjörð Bjarmason
Quoted 3 lines · Junio C Hamano
Hmph, we probably would want to do s/50 character/&s/ in the two manual
pages.I'm not sure if "with a single short (less than 50 character) line" is
is grammatically correct with "characters", since "characters line" wouldn't make sense.
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
On the other hand that sentence violates the rule that when you put something in parens your sentence should still make sense with s/[()]//g, "a single short less than 50 character line" is pushing it.
If the number of characters is less than 50, then there are fewer than 50
characters.
This demonstrates the distinction between "less" and "fewer". Intensities (like raw numbers) and mass quantities are less; discrete objects are fewer.
Quoted 1 line
Quoted 1 line
This is a short line of fewer than 50 characters.
This demonstrates a grammatically correct way of phrasing a constraint on line length. I could have put the latter half in parentheses, but then it wouldn't be true. :-)
Quoted 6 lines
I don't understand the context of that remark or what you're replying to.
I meant that I found the "single short (less than 50 character) line" bit in git-commit.txt, gittutorial.txt and user-manual.txt odd to read.
Agreed.
Quoted 1 line
What did you mean?
See above. You could also use "50-character" as an adjective, but "single short line (of fewer than 50 characters)" may be more easily parsed. Another option is "single short line (shorter than 50 characters)". I find it less stilted without "of fewer", but the repetition of "short" is a little clumsy.
Josh