News for hackers. Stuff that matters.
Re:Althttpd: Simple webserver in a single C file by layoutIfNeeded on Tuesday June 08, 2021 @08:44AM (#27434390)
I want to be able to tell why a given line of code was introduced. Seeing "Fix indentation" in the output of `git blame` won't help me with that.
Re:Althttpd: Simple webserver in a single C file by elliotf on Tuesday June 08, 2021 @09:02AM (#27434580)
I also want to be able to tell _why_ which is why I dislike working on codebases that squash commmits. Too many times I've done a blame to see why a change was made, and it's a giant (> 10) list of commit messages. Oftentimes, the macro description of what was going on does not help me with the line-level detail.

Also, in case it helps you in the future, `blame -wC` is what I use when doing blame; it ignores whitespace changes and tracks changes across files (changes happened before a rename, for example.)

Re:Althttpd: Simple webserver in a single C file by gregmac on Tuesday June 08, 2021 @11:29AM (#27436480)
Neither does squashing though: you still can't tell if that line was introduced or modified.

I've come across "fix indentation" or "fix typo" commits where a bug was introduced, like someone accidentally comitted a change (maybe they were debugging something, or just accidentally modified it).

For example: I'm tracing a bug where a value isn't staying cached. I find a line of code DefaultCacheAge=10 (which looks way too short) and git blame shows the last change was modifying that value from 86400. What I do next will be very different if the commit message says "fix indentation" vs "added new foobar feature" or "reduced default cache time for (reason)".

Re:Althttpd: Simple webserver in a single C file by emn13 on Tuesday June 08, 2021 @08:54AM (#27434499)
git blame --first-parent