3 ms·
> The problem with this is maintaining comments. That's like saying "the problem with healthcare is that it costs money". Of course comments can get out of dat
by IshKebab 9y ago
> The problem with this is maintaining comments.
That's like saying "the problem with healthcare is that it costs money". Of course comments can get out of date. The solution isn't to throw them out!
- ajuc 9y agoThere's no alternative for healthcare. There's alternative to in-code comments answering the question "why" - it's commit messages. They can't be out of date.
- usrusr 9y agoBut commit messages can easily get plowed under in some annoying "reformatted, I hate tabs/spaces" commit. I do like to see some "why" sprinkled in here and there that will survive those accidents. But I will nonetheless prefer blame output if it is still meaningful. Also, I enjoy a commit that removes redundant comments almost as much as one that removes redundant code.
- vk23 9y agoYou can either pass a commit id to git blame to see changes before the reformat happend or you can use git log like this: git log -L0,10:file.txt
- TomMarius 9y agoWhat? So in my case I'm supposed to browse literally millions of commit messages in order to understand the code?
- YCode 9y ago"The problem with installing a roof on your house is one day it can be blown off."