You are viewing a single thread.
View all comments View context
0 points

My personal cent: Some tools strongly suggest that your commit messages should not exceed 50 characters in the first line, and 80 characters on every other line. While the 80-character rule makes sense if you’re using a terminal (and someone on your team will even if you don’t), I strongly disagree with the 50-character rule. If you want to be in any way clear what you did, 50 characters is simply not enough even for the subject line.

permalink
report
parent
reply
0 points

The reason for the approximately 50 character limit is because there’s many tools that display a single line and will truncate it if it’s more than about that length (though really the point of truncation can vary wildly – plenty of tools will let you go twice that before they cut you off). So if your one line summary is too long, it’ll be cut off and harder to understand your commit at a glance.

You always can elaborate in a second paragraph, at any rate.

permalink
report
parent
reply
0 points

How much can you really put in 50 characters?

Fix: NPE in customer download component when users – That’s 50 characters. Should I not mention where I fixed the bug?

Fix: NPE when users downloaded customers without s – I think I can get rid of the actor in some cases.

̀ Fix: NPE when downloading customers without select`. The summary I want to give cannot be truncated any further.

Fix: NPE when downloading customers. This fits, but is so vague as to be pointless as a summary, in my view.

permalink
report
parent
reply
0 points

I don’t follow the 50 character rule, but to answer your first question: imo, no, don’t mention where you fixed the bug. This is a commit message that is explicitly tied to the place where you fixed the bug. You can go into more detail in the PR if you need to.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 6.8K

    Monthly active users

  • 797

    Posts

  • 7.3K

    Comments

Community moderators