News for hackers. Stuff that matters.
Re:“After 20 years coding I just realised, commit messages a... by scintill76 on Tuesday January 17, 2023 @11:25AM (#34414495)
> whenever I'm trying to figure out where something went wrong, commit are not the thing I look at, it's the code changes in the commit

And how do you locate the commit of interest? I usually search the commit messages…

Re:“After 20 years coding I just realised, commit messages a... by JoeyBananas on Tuesday January 17, 2023 @11:40AM (#34414713)
Git bisect is one option, but I usually find myself using "git show HEAD~n" directly.
Re:“After 20 years coding I just realised, commit messages a... by mejutoco on Tuesday January 17, 2023 @11:47AM (#34414821)
Git log -Sterm to find commits where term was added or removed.
Re:“After 20 years coding I just realised, commit messages a... by scintill76 on Tuesday January 17, 2023 @01:11PM (#34416208)
What if you only remember that the change you're interested in was fixing an issue with the frombulator, not that it did so by changing the "term"? A good commit message in this case would probably mention the frombulator, so you would find it by search and then see that the "term" was changed.
Re:“After 20 years coding I just realised, commit messages a... by mejutoco on Tuesday January 17, 2023 @02:42PM (#34417626)
I would try `git log -Sfrombulator`, maybe a comment shows up?

It is what I usually do, not a solution to all problems :)

My commit messages look like small essays (after the first summary line, of course), so I think we agree.

Re:“After 20 years coding I just realised, commit messages a... by thinking4real on Tuesday January 17, 2023 @01:11PM (#34416198)
All of the answers to this will amount to being able to find them in some other way.

No one will answer what to do if you have no idea of what’s in the code (bc it’s old or you’re new to this repo).

Basically, this idea is a failure but some people think it’s neat so they’ll come up with contrived justifications that make no sense.

Re:“After 20 years coding I just realised, commit messages a... by u801e on Tuesday January 17, 2023 @01:46PM (#34416800)
Running a command like git blame on a file you plan to modify and running git show on the sha1 value can help you find relevant commits.