On Thu, Mar 09, 2017 at 05:50:36PM -0500, Ehsan Akhgari wrote:
> > On the subject of long commit messages, here's a commit message I wrote
> > that had 3 paragraphs to explain a patch that just changed a 0 to a 1:
> > https://hg.mozilla.org/integration/autoland/rev/bf059ec2bdc9
> 
> I think the length of the commit message is entirely missing the point.
> "Typo fix" is a perfectly fine commit message depending on the commit.
> The point is helping the reviewer and future readers of the commit to
> understand what it is that it's doing...

Come to think of it, I think there are two orthogonal goals, and that
only one of them should be addressed in commit messages.

- why the code has been changed.
- what the code is doing.

The former belongs in the commit message, but the latter, most of the
time, belongs in code comments. It's painful to figure out why some
tricky code works the way it works by looking at its history (which
usually requires jumping through several commits before finding the one
that actually introduced the code), when it could have been spelled out
in a comment.

Mike
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to