4 ms·
The best comments are surrounded by pertinent code. I don't think I've seen a workflow yet that allows you to attach specific portions of commit messages to spe
by cyanoacry 13y ago
The best comments are surrounded by pertinent code. I don't think I've seen a workflow yet that allows you to attach specific portions of commit messages to specific code passages, so it's a little difficult to ensure that what you're saying is clear.
It's also not guaranteed to stay with the lifetime of the file. This is often a problem if you're downstream; if you just download the source code, it's a lot of steps to go back and get to the source repo and look at all the commit messages.
Additionally, the commit log will be only be a log of deltas, and doesn't give you a picture of what's finally there. With well-written comments, you should get a good idea since they're kept up to date (I hope!) and present a unified picture of what's going on.
- ajuc 13y ago> Additionally, the commit log will be only be a log of deltas, and doesn't give you a picture of what's finally there. With well-written comments, you should get a good idea since they're kept up to date (I hope!) and present a unified picture of what's going on. Actually deltas are very useful. Blameing code is often very helpful, even if commit messages aren't that great, because you can see which lines were there from the start, and which lines changed together. That alone is often enough to deduce if something you see in code is stupid error, or sth that was intended. In my company every commit has JIRA task number attached, so for EVERY line of source you can easily find why it's there from the big perspective. That's very valuable, and it's much easier to maintain commit messages than to update comments. Of course some comments are still needed.,