Live data from Hacker News

Git log is not a changelog

agateau.com

91–92 of 92 posts

Re: Git log is not a changelog

#91

Earlier quoted context omitted.

Why would I want to do that? Usually if there's a problem I'll either write a new test or see if someone modified a test I thought was covering the case Usually people 'own' a file or part of the system so that wouldn't really be happening anyway

> Why would I want to do that? Because sometimes we can learn from history. If a mistake was made at some point it can be good to understand why. Of course you can adopt the mindset that you don't care what ended up causing a bug, but learning from mistakes is a good thing. > see if someone modified a test I thought was covering the case How do you see if someone modified the test then? I feel like we are maybe misun…

> Because sometimes we can learn from history. If a mistake was made at ...

A commit message helping me learn anything that I didn't get from a code comment sounds like a stretch. I'm doubting this

> How do you see if someone modified the test then? I feel like we are maybe misunderstanding eachother

Clearly. I was suggesting I might see commit messages if I'm using git blame to find out if a case was removed from a set of test or if it never existed in the first place. But I don't see how messages would help at all in anything I do. What I'm looking for is far too specific to be in a commit message and this whole thread about using commit messages to learn sounds nonsensical.

Re: Git log is not a changelog

#92

Earlier quoted context omitted.

If you have never needed to find out why a particular piece of code is the way it is, then you have been very lucky to work in very clean code bases. In my own experience, this has been an infrequent but inevitable part of work - maybe once a month or so, I have had to understand whether a particular piece of code, that seems wrong, had a good reason for existing or not. Sometimes it turned out to be a mistake in the…

ArrayBoundCheck didn't say they never had to find out why a particular piece of code is the way it is, just that they didn't have to search through log messages. For isntance, when you use "git blame" and similar tools, the log messages are not involved. You might end up reading the log message of the commit that was responsible for a change, but you didn't search log messages to get there. In a project with poor com…

tsimionescu didn't say anything about searching the logs.

The commit message explains (/should explain) why the commit was made. That is useful even if you arrive at the commit via git blame, bisect, etc.

Post reply on HN