Git-blame-someone-else
21–30 of 100 posts
Re: Git-blame-someone-else
#22Re: Git-blame-someone-else
#23The commit hash of the blamed commit and all ones after that change, so the system works. One day we may be able to reliably/easily generate SHA-1 collisions to really get someone else to take the blame :-)
Missed opportunity: append random whitespace characters to all subsequent commits so that the first N characters of commit id are retained.
Re: Git-blame-someone-else
#24Stop using git blame to look up who authored code, it's not a useful tool. Use git log -S to search for changes to that line (then repeat with the previous version of that line, until you find the original author), and/or git log -L to track changes to a code block. Don't waste your time with git blame.
My editor (sublime text) has built in git blame support. It's literally right-click -> blame file, and it will put the author of every line in the margin.
Re: Git-blame-someone-else
#25I runned a code formatter in our code base. Years later I was still 'blamed' for many things in our code as few files were untouched.
We recently converted our monolith codebase at work from windows-1252 encoding to UTF-8 and now the entire project looks like it was written by 1 guy
Re: Git-blame-someone-else
#26https://github.com/jayphelps/git-blame-someone-else/graphs/c...
Re: Git-blame-someone-else
#27I runned a code formatter in our code base. Years later I was still 'blamed' for many things in our code as few files were untouched.
I think it's best to migrate to a preferred formatting slowly, versus touching everything at once. I've had open pull requests that I've started over due to aggressive reformatting like that. Between that and breaking tools like 'git blame', it can be painful.
Once you move on from just banal issues like whitespace and move your way up to actual structural concepts in the code, ad-hoc starts completely falling apart (at least in my experience.)
I once encountered someone who did a giant re-formatting of code by rewriting past commits. Pretty disruptive for a day but did manage to keep history in-tact. Also, a little (or a lot?) dangerous...
Re: Git-blame-someone-else
#28Could be good for resume padding. O yea, I wrote 75% of linux...
Yeah, I work in information security for a living, how did you guess?