Live data from Hacker News

Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

github.com

111–120 of 130 posts

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#111
post #16

Earlier quoted context omitted.

I mean, no. If you work on a codebase that's been going for more than a few years, the author likely doesn't even work there anymore. The commit is the important thing.

Frankly the commit message is usually the important thing. I care about why a change happened. Give me a Jira ticket, or a line of reasoning, or some documentation. I need to know this far more often than I care who literally typed the code in the computer.

You also shouldn't assume the commit author is the same person who literally typed the code. Git is a version control system, not an audit trail.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#112
Gitlab/Github should add a feature that any submitted merge requests automatically emails the last author of the code lines being modified, to let them know about the MR and provide any feedback if needed.

Or maybe someone has wrote a bot/Git hook for that?

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#113

Gitlab/Github should add a feature that any submitted merge requests automatically emails the last author of the code lines being modified, to let them know about the MR and provide any feedback if needed. Or maybe someone has wrote a bot/Git hook for that?

Basically just an OWNERS file, but asynchronously?

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#114

Gitlab/Github should add a feature that any submitted merge requests automatically emails the last author of the code lines being modified, to let them know about the MR and provide any feedback if needed. Or maybe someone has wrote a bot/Git hook for that?

For a linux user, you can already build such a system yourself quite trivially with git blame directly, piping it through grep awk and git log to email yourself that list with a cron job.

    (crontab -l 2>/dev/null; echo '15 22 \* \* \* /usr/bin/git blame --line-porcelain abc123.. -- /path/to/file.txt | awk "/^author-mail/ {print \$2}" | sort -u | /usr/bin/mail -s "Authors" user@example.com') | crontab -

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#115

Earlier 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…

> 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…

I'm not in disagreement about being able to tell who wrote some piece of code, I like gitlens in my vscode for ex.

The feelings hurt thing is real, unfortunately for myself I am that person that gets butthurt but it's a phrasing thing, "why did you do this?" vs. something more neutral sounding like "hey this has this side effect are you aware".

Anyway unfortunately in my case too we're not allowed to write tests so it really is an exercise in omniscience.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#116
post #74
post #10

By 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.

I was thinking that I would really like a tool that shows the history of bad code, and who actually wrote it and amended it, not just who last changed it.

Particularly so if I can see that someone wrote bad code, so I can review the rest of their code.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#117

I like it. A problem I had right away is some people commit using two different emails. Like one from home computer and one from work computer. Would be nice to be able to define them as the same thing.

You might be able to do that with built-in git functionality called gitmailmap. It is basically a file where you can map multiple names and emails to the same one.

I set this up and tested with `git log` and then found that PyCharm's git client apparently doesn't support this. Disappointing.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#118

Earlier 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.

Is this something you do in a brand new project whose organization, direction and overall requirements are not clear? Or persistently?

There is such a concept as a brand new project not requiring version control until it hits a certain stage: you know it when you get there.

Re: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming

#120

Gitlab/Github should add a feature that any submitted merge requests automatically emails the last author of the code lines being modified, to let them know about the MR and provide any feedback if needed. Or maybe someone has wrote a bot/Git hook for that?

The Git project has a script for that: https://github.com/git/git/blob/master/contrib/contacts/git-...
Post reply on HN