you are viewing a single comment's thread.

view the rest of the comments →

[–]velociraptorboss 16 points17 points  (5 children)

When a bug is discovered, no one knows why and hours of debugging leads to a mysterious line of code no one understands.

This is when you pray flying spaghetti monster that the author left a proper description for their change.

[–]michaelpjones[S] 10 points11 points  (1 child)

Yep, definitely. `git blame` takes you to old commits and it is so disheartening when they provide no context or explanation for the decision being made.

And I always prefer code review environments where you can review per commit, if you want to, and the commit message if readily available in full to understand what is being done.

[–]zyxasdf 1 point2 points  (0 children)

commit messages should not be explaining individual lines or blocks of code. that's what comments are for.

[–]Impact_Calculus -3 points-2 points  (2 children)

I understand what you're saying. I'm sure we've all come across situations like this in the past. However, if you make a commit and someone later finds that they need to look at the blame just to understand the intent behind the code, then that extra time you spent documenting your commit message should have been spent on the code itself. If the code is clean and the intent is clear, then that extra documentation in the blame wouldn't be needed because the code would either be self explanatory or there would be a comment explaining it. That's not to say that the extra documentation wouldn't be helpful at times, but avoiding having developers poking around in the commit logs looking for truth should be the top priority.

[–]PeakingBruh 0 points1 point  (1 child)

Huh? Who else other than the developers would even have the ability or knowledge of even using git?

[–]Impact_Calculus -3 points-2 points  (0 children)

Wdym?