This is great. I do this sort of git-blame accounting to track how much code is written by AI versus humans in each release of my app. My "blame script" has been slowing down as the repo size increases. I was just about to add caching, like you have. Have you thought about adding the ability to limit the stats based on a set of file patterns? Perhaps like this, where the file follows gitignore conventions? git-who ta…
Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
101–110 of 130 posts
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#102By the way, git blaming is really misunderstood by a lot of people; its NOT about who did it, its about which commit is to blame -- that's different.
Isn't this sort of an inconsequential point? The commit still has one and only one author and that's almost certainly what I'm looking for so I know who to go ask questions about their code. I also use it to find the commit but less frequently.
Linking a line of code back to the commit is useful even if you can't ask the author about it. It tells you what other lines of code are involved and what the overall purpose is. It's significantly more useful if you can link it into documentation outside the code: ticketing systems, requirements docs, etc.
The main limit to svn blame in that situation was that quite often it would hit commit 1, when the codebase had been imported from Visual SourceSafe.
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#103Earlier quoted context omitted.
I'm pretty sure it's about who wrote the code. 'git blame' is named after the subversion and CVS blame features that do the same thing. Subversion docs are clear that it's a snarky name and that 'svn praise' and 'svn annotate' are neutral synonyms. Perhaps someone familiar with CVS can comment on its history there since it seems to be the first source control to add it. EDIT: and one of the main reasons it's a useful…
> EDIT: and one of the main reasons it's a useful feature is it tells you who to talk to to understand a piece of code, or to coordinate a roll back, or to do any other sort of communication. It probably matters more in a big company where code is changing frequently and you're unlikely to know everyone and what they're working on. It's actually a pretty awful feature because it misses so much context. I've been blam…
Aviation is the shining example of this, combining high traceability (you should be able to track each part back to the factory and to all the technicians who have worked on it) with accident inquiries that are focused around finding cause and avoiding future risks rather than assigning blame.
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#104Amazing work and excited to dig into this more thoroughly
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#105If a patch or pull request is sent but an internal contributor (the only internal contributor in Vim's case for a long time) reformatted it before merging then the same work is double-counted (if full history is kept) or only attributed to the reformatter (if history is squashed during/before merge).
This doesn't make the result wrong, of course, the tool is doing exactly what it says on the tin. But it does mean that, without reviewing the contribution process (current and past), you might need to be less definite¹, when stating a meaning derived from the result, because how the result is interpreted might not be quite right given the input data available.
----
[0] https://sinclairtarget.com/blog/2025/03/who-will-maintain-vi... in case you skipped by the link when looking at git-who's readme.
[1] perhaps just by giving caveats to make sure that the reader has sufficient context regarding the limit of the process
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#106Earlier quoted context omitted.
git bisect is about which commit is to blame for a reproducible problem. git blame is about which author most recently touched each line (in what commit); i.e. is to "blame" for that line having its current content. You're right in that git blame is most useful for finding which commit touched a line. What was done in the commit is more important than who did it. git blame is very useful even in a solo project where…
Unless you get lazy like me and start committing only out of shame once the modified file count reaches close to triple digits or prior to doing very sketchy changes.
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#107Earlier quoted context omitted.
Alternatively git praise https://github.com/ansman/git-praise
Why wouldn’t you just set an alias in your global git config for this?
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#108For a low-tech version of this, I have long had an alias (which I call "nerdwars") to "git shortlog -ns --no-merges" which just gives the number of commits by contributor from most to least. It's a good way to get a sense for who the major contributors in a project are.
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#109By the way, git blaming is really misunderstood by a lot of people; its NOT about who did it, its about which commit is to blame -- that's different.
BTW, one of the more frustrating things about "git blame" comes about when cleaning up an old codebase: In my current job I had to move a lot of files, combine repos, reformat code, ect, ect. "git blame" and similar tools often always show my name, even though I didn't write the code.
Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming
#110Earlier quoted context omitted.
> Subversion docs are clear that it's a snarky name and that 'svn praise' and 'svn annotate' are neutral synonyms. A few years ago, some Atlassian developer changed "Blame" in the BitBucket UI to "Annotate". I remember a lot of people being frustrated because they couldn't find "blame" anywhere and the change was never officially announced. It just happened one day Someone opened a ticket with BitBucket about it whic…
If I ever saw an "annotate" command I'd immediately assume it's for adding notes as metadata outside the actual software versioning tool, not for seeing who wrote the code in question. Nomenclature matters. Do not reinvent terms just for fun.