News for hackers. Stuff that matters.
Re:My Favourite Git Commit by AstralStorm on Friday October 18, 2019 @07:05AM (#21290297)
Write a regression test (including its documentation) instead of just documenting the issue in human interpreted language, immutably.

Your future maintainer will thank you for not having to dig through repository history.

Re:My Favourite Git Commit by leejo on Friday October 18, 2019 @08:06AM (#21290614)
It goes without saying that commits should include tests that cover the change, where possible.

> immutably

That's what makes this modus operandi so powerful IMO - comments in code may go unmaintained, tests may start failing for other reasons, issue trackers come and go, developers leave the company, documentation rots.

The commit message is (unless you have a bad actor) immutably linked to the original change, and that's exactly why you should be thorough in expressing its reason for being. I can git checkout the point in time (perhaps having bisected) and have the information to allow me to reproduce the issue.