git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SubmittingPatches: Cite the 50 char subject limit
@ 2010-07-28 14:11 Ævar Arnfjörð Bjarmason
  2010-07-28 17:23 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-28 14:11 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Æ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.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Documentation/SubmittingPatches |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index eb53e06..099b238 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -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".
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] SubmittingPatches: Cite the 50 char subject limit
  2010-07-28 14:11 [PATCH] SubmittingPatches: Cite the 50 char subject limit Ævar Arnfjörð Bjarmason
@ 2010-07-28 17:23 ` Junio C Hamano
  2010-07-28 19:25   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2010-07-28 17:23 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] SubmittingPatches: Cite the 50 char subject limit
  2010-07-28 17:23 ` Junio C Hamano
@ 2010-07-28 19:25   ` Ævar Arnfjörð Bjarmason
  2010-07-28 19:49     ` Joshua Juran
  0 siblings, 1 reply; 6+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-28 19:25 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Wed, Jul 28, 2010 at 17:23, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> 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
> 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.

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] SubmittingPatches: Cite the 50 char subject limit
  2010-07-28 19:25   ` Ævar Arnfjörð Bjarmason
@ 2010-07-28 19:49     ` Joshua Juran
  2010-07-28 20:15       ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 6+ messages in thread
From: Joshua Juran @ 2010-07-28 19:49 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Junio C Hamano, git

On Jul 28, 2010, at 12:25 PM, Ævar Arnfjörð Bjarmason wrote:

> On Wed, Jul 28, 2010 at 17:23, Junio C Hamano <gitster@pobox.com>  
> wrote:
>
>> 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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] SubmittingPatches: Cite the 50 char subject limit
  2010-07-28 19:49     ` Joshua Juran
@ 2010-07-28 20:15       ` Ævar Arnfjörð Bjarmason
  2010-07-28 20:32         ` Joshua Juran
  0 siblings, 1 reply; 6+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-28 20:15 UTC (permalink / raw)
  To: Joshua Juran; +Cc: Junio C Hamano, git

On Wed, Jul 28, 2010 at 19:49, Joshua Juran <jjuran@gmail.com> wrote:
> On Jul 28, 2010, at 12:25 PM, Ævar Arnfjörð Bjarmason wrote:
>
>> On Wed, Jul 28, 2010 at 17:23, Junio C Hamano <gitster@pobox.com> wrote:
>>
>>> 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.
>
> 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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] SubmittingPatches: Cite the 50 char subject limit
  2010-07-28 20:15       ` Ævar Arnfjörð Bjarmason
@ 2010-07-28 20:32         ` Joshua Juran
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Juran @ 2010-07-28 20:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Junio C Hamano, git

On Jul 28, 2010, at 1:15 PM, Ævar Arnfjörð Bjarmason wrote:

> On Wed, Jul 28, 2010 at 19:49, Joshua Juran <jjuran@gmail.com> wrote:
>> On Jul 28, 2010, at 12:25 PM, Ævar Arnfjörð Bjarmason wrote:
>>
>>> On Wed, Jul 28, 2010 at 17:23, Junio C Hamano <gitster@pobox.com>  
>>> wrote:
>>>
>>>> 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.
>>
>> 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.

>> 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.  :-)

> 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.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-07-28 20:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 14:11 [PATCH] SubmittingPatches: Cite the 50 char subject limit Ævar Arnfjörð Bjarmason
2010-07-28 17:23 ` Junio C Hamano
2010-07-28 19:25   ` Ævar Arnfjörð Bjarmason
2010-07-28 19:49     ` Joshua Juran
2010-07-28 20:15       ` Ævar Arnfjörð Bjarmason
2010-07-28 20:32         ` Joshua Juran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).