Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: drop 50-character limit for commit messages #8327

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

Replace the current limit of 50 characters for the first line of the commit message with a more flexible formulation.

Copying the reasoning from #8294 (comment):

50 characters is a pretty hard limit when you need to include something like child_process: and/or are a non-native speaker with reduced vocabulary.

Replace the current limit of 50 characters for the first line of the
commit message with a more flexible formulation.
@addaleax addaleax added doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project. labels Aug 29, 2016
@jbergstroem
Copy link
Member

I'm -1. Can only assume there will be a lot of opinions here, so I'll try to at least elaborate my thoughts:

  1. In terminals when using git log --graph wide lines can easily occur. Longer git titles makes this very painful to page through. Also, github will truncate (...) long titles. Not sure of the exact cutoff but I think it's around 60-70.
  2. English/language argument: Valid point. On the other hand, other committers/developers should be able to help out pre-landing, similar to how code review is done.
  3. The manpage of git commit suggests keeping to 50 characters or less; we'd be following suit.

@cjihrig
Copy link
Contributor

cjihrig commented Aug 29, 2016

I can totally relate to the problem of child_process: taking up most a fair amount of the available characters, but I think I'm -1 due to @jbergstroem's 1st and 3rd points.

@addaleax
Copy link
Member Author

Okay, given to the number of -1’s/downvotes, I’m inclined to close this a bit later. Thanks @jbergstroem for naming a few reasons for the limit!

In terminals when using git log --graph wide lines can easily occur.

True, but that’s only a concern when actively using merge commits instead of rebasing/cherry-picking, is it?

Not sure of the exact cutoff but I think it's around 60-70.

It’s 70.

The manpage of git commit suggests keeping to 50 characters or less

Interesting, I didn’t know that.

@ronkorving
Copy link
Contributor

From git commit help:

Though not required, it's a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git. For example, git-format-patch(1) turns a commit into email, and it uses the title on the Subject line and the rest of the commit in the body.

But that still doesn't really explain why 50 is the sweet spot.

@lpinca
Copy link
Member

lpinca commented Aug 30, 2016

Not sure of the exact cutoff but I think it's around 60-70.

It's 72, and it's a fair limit imho.

@bnoordhuis
Copy link
Member

But that still doesn't really explain why 50 is the sweet spot.

It displays well in text-only email clients. Git started out in the linux kernel community and their workflow is built around email (and terminals.)

@lpinca
Copy link
Member

lpinca commented Aug 30, 2016

While it's true that the manpage suggests a limit of 50 chars it is also true that the Linux Kernel documentation does not impose such limit.

For these reasons, the "summary" must be no more than 70-75
characters, and it must describe both what the patch changes, as well
as why the patch might be necessary. It is challenging to be both
succinct and descriptive, but that is what a well-written summary
should do.

It would be great to have a soft limit of 50 chars and an hard limit of 70? chars but then I understand that it would be hard to make people respect the soft limit.

On the other hand, other committers/developers should be able to help out pre-landing, similar to how code review is done.

This can help and is a totally valid point.

@addaleax
Copy link
Member Author

addaleax commented Sep 1, 2016

Given the number of downvotes, I’m closing this. Thanks everyone for explaining where your opinions come from!

@addaleax addaleax closed this Sep 1, 2016
@ronkorving
Copy link
Contributor

2 👍 vs. 3 👎
I demand a recount ;)

@refack
Copy link
Contributor

refack commented Apr 14, 2017

@addaleax you closed it in two days, I'm with @ronkorving

IMHO the git manual is not a strong argument as it is legacy more than lore.

@addaleax
Copy link
Member Author

@refack I’m not stopping anybody from picking this up again, but my energy for pushing contentious issues is limited and I prefer to keep it for things that matter more to me than this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants