4 ms·
After reformatting, did git blame always pointed to those commits and the most recent author, or were they added to --ignore-rev?
by rapfaria 2y ago
After reformatting, did git blame always pointed to those commits and the most recent author, or were they added to --ignore-rev?
- Arainach 2y agoGoogle doesn't use Git internally, and its code search and source control tools expose the concept of "show blame before this change", so in practice reformats like this aren't troublesome with regard to blame.
- montag 2y agoThis is true but I think it would still be nice for VCS to have a first class concept of "peek through" changes (whitespace, formatting, etc.) for the purpose of blame.
- tantalor 2y agoBlame can be configured to ignore cleanups like this.
- mckn1ght 2y agoThis has always been something I use to argue against just reformatting code in isolation. TIL git provides a way to ignore that. Thanks!
- rsc 2y agoNot git, but yes, it did mess up the blame lines. Luckily most people don't care about the attribution on BUILD files. But I did get the occasional email for years afterward about "hey looks like you added this build target, can you explain it?" or just an automated tool deciding I was the last person who edited the file so I was a good reviewer for a future change. Those pings were a fun tour of directories I'd never heard of (but did edit). Been a few years since I got one of those.