git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] SubmittingPatches: Cite the 50 char subject limit

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 28, 2010, 19:25 UTC
Message-ID
<AANLkTimieHJaw1UmKtQvS4=2i8TrmR5A5zFO13NaNBo=@mail.gmail.com>
In-Reply-To
<7vzkxb4j1v.fsf@alter.siamese.dyndns.org>
On Wed, Jul 28, 2010 at 17:23, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Æ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
Show 17 quoted 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.
>
> 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.

Previous: Junio C HamanoNext: Joshua Juran
Message 3 of 6 in “SubmittingPatches: Cite the 50 char subject limit”
  1. SubmittingPatches: Cite the 50 char subject limitÆvar Arnfjörð Bjarmason, Jul 28, 2010
  2. Junio C HamanoJul 28, 2010
  3. Ævar Arnfjörð BjarmasonJul 28, 2010
  4. Joshua JuranJul 28, 2010
  5. Ævar Arnfjörð BjarmasonJul 28, 2010
  6. Joshua JuranJul 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.