12 comments

[ 3.5 ms ] story [ 58.6 ms ] thread
The only downside of this script is that it changes commit hashes, so you actually can only blame someone else if you force-push or just showing blame on your computer. It would be nice if it could be done without changing the commit SHAs.
That could've been possible if Git didn't use commit metadata hashes, (un)fortunately it's smart enough to do that.
The whole point of commit hashes is that you can't do that, so no, being able to change history undetected would not be nice at all.
Initially I thought it would show all changes to a file that were made by someone other than the person running the command. So, for instance, if there's a line I changed recently, it would go down history further to find the original author.
That's what I was looking for too. Would be useful.
This is why I sign my commits... It's also easy these days to do it with an SSH key
It's actually a pretty convenient script to use locally when doing repository manipulation, for example when you're cherry-picking other people's commit via patch and want to attribute it to them.
But changing commit author is quite easy with git, just do: ‘git commit -a —author “<name+email>”’
I often need to change the author on commits that aren't the topmost one.
Then do it via rebase -i and e. I do that constantly,
Yeah, but that's more annoying ;)