Created: 09 Feb 2006
Over the past few years I have been collecting useless commit messages. I do this to remind myself what commit messages are for.
For those who have never used a version control system such as CVS, the basic mode of operation is to change a file and then commit that change back into the version control system. At the time of committing the change, many version control systems require or suggest a small amount of text explaining the change. In fact, some sites require that the user submits this message, which is somewhat counter-productive when people fulfill the requirement in the following ways:
The useless:
Small change
Really, why bother? Tell us the truth; I'm too lazy to explain my
actions.
Simple and accurate.
The emotional:
. meh
Speaks of some significant amount of frustration, really.
The factually accurate, but still completely useless:
Changed to use egrep.
Why? What possessed you to use egrep? Did you wake up this morning and decide on some mad masterplan to use egrep rather than grep? Or was there some actual reason for the change. Maybe grep broke in some special circumstance, but egrep didn’t. But in a month’s time, when I’m trying to work out why this code broke in some other special circumstance, your commit message might be the only thing that stops me just reverting it back to using grep and fix my problem, but regress yours.
The totally redundant:
< foo
---
> baa
That’s the exact information I could have obtained from cvs diff
.
Completely redundant and again, completely useless.
Commit messages need to explain why you carried out that course of action. That’s the only thing I can’t work out for sure by reading the code.