3 ms·
> some normally-hidden data in the commit lets a client resurrect the original, highly-detailed commit graph including every "uh forgot to commit on Friday afte
by pjc50 3y ago
> some normally-hidden data in the commit lets a client resurrect the original, highly-detailed commit graph including every "uh forgot to commit on Friday afternoon, dunno what this was but it's important
Is that supposed to be a good or even useful thing?
- kbolino 3y agoThere are in-band and out-of-band ways of communicating information that matters to your collaborators (including future-you) but not to the compiler. Commit messages (out-of-band) tie this information to the specific time when the change was made. They also don't clutter the code up. Comments (in-band) tie this information to the specific place where the change was made. If overused, they make the code harder to read. Commits can get lost in the noise, though blame and bisect can help find them. Comments can get stale and cause more confusion than assistance. Honestly, if we spent more time reviewing and revising each other's code than just writing it, then comments (combined with refactoring for readability) would probably be the better solution. But that would slow down development. If you're going fast or lean, then relying on commit messages is better than nothing at all or fired-and-forgotten comments.
- 01HNNWZ0MV43FF 3y agoIt's one of those things I rarely need, but really need when I do need it. Commit numbers are an API and it's frustrating when I write something like "Fixed in commit xyz" or "Broken in commit xyz" or "Tested manually in xyz" and then after a rebase (Not a private rebase I asked for, but part of the CI routine), my comment makes no sense and Github says "We can't find that commit". You can paste it in manually but the context is lost, it's not in `git log --graph` anymore.