Ignoring bulk change commits with Git blame (2019)
moxio.com
moxio.com
I don't use tig much otherwise, but for this purpose I've not yet seen a better (and faster!) tool.
In such a case, you'll find that the older code (skipping the bulk change commit) does not have the (mis)feature you're looking for, and you'll have to go the extra step of looking through the ignored commits.
It makes the case of finding changes in some commits a bit harder (but not hard), in exchange for reducing the noise from those same commits. Having been long hampered by ugly codebases that I didn't dare touch for fear of "blame" poisoning, I think this is a net positive overall.
https://public-001.gitsense.com/insights/github/repos?p=comm...
and click on the eslintrc.json file, you'll see all the versions for this file for the last year. And to quickly iterate through them, you can click on the version number on the left hand side.
In the future, I want to create a slider, among other things to make navigating history insanely easy, since blame, as this blog post points out, can result in a lot of context being left out.
Disclaimer: I'm the creator of the tool that I linked to above
https://marketplace.visualstudio.com/items?itemName=pomber.g...
I enjoy git's way of handling version control better than perforce but there's no denying that p4v is an amazing tool for browsing through code that has a lot of history.
(1) git blame <file> (2) git blame <uninterestinghash>^ <file>
which tells blame to go back to before the hash and do the blame.
I run that loop repeatedly, picking the most recent hash each time (by date/time), until I get back to the change that interests me.
Effectively, I am doing a manual implementation of displaying a "timeline" of commits that apply that code.
But whatever works for you :-)
I added generating a .gitignorerevs file during these conversion to our process document. what sucks egg though is that there's no standard for what to name these files. there's no out of box support. there was a confusing nasty mess of a thread for how to modify vscode's ultra-popular git lens plugin to add a git ignore revs file but 70% of the advertised "works for me" threads were wrong. in multiple ways often. we never found how to open the gui screenshots folks were showing to modify blame arguments; we had to resort to json modification which scared the crap out of some weakling junior devs with shitty constitution. the use of ${workingDir} or whatever in the config never worked, as other people latter pointed out. it wasn't clear what we needed in the json. it was a bloody nightmare. just for the very first medium grade engineer I tried getting this working with.
holy shit I wish git would normalize a --ignore-revs-file so bad.
to those wringing pearls about how this is a vector for people to sneak changes in: tool up. build safeguards. holy shit the complaining & fear & uncertainty & doubt over basic stuff, as if we can't see these changes happening, as if everyone is a hapless idiot who can't notice... I fear the society of losers your attitude suggests. just get better. write tools to notice these changes. which you would already, if you look at your git pulls. I do.
Maybe the popularity of language-servers can help bring this forward.
[1] Even smart people have trouble with it: "Amazingly, surprisingly, counterintuitively, the indentation problem is almost totally orthogonal to parsing and syntax validation." http://steve-yegge.blogspot.com/2008/03/js2-mode-new-javascr...
By looking at the diff between trees, you can ignore a lot of the extra noise like indentations, spaces and other styling changes.
Indeed. But there’s a perfect one (for some definition of perfect) built into every compiler. It’s a shame that more compilers don’t do things like make the AST available.
.NET Compiler Platform (“Roslyn”) is a great counter-example.
https://github.com/cregit/cregit https://lwn.net/Articles/698425/
> git log -S"Hello World"
shows you all commits that either introduced, or deleted 'Hello World'.
Personally I see bulk changes as something that is legitimate change and should appear in the blame history, the same way refactorings are supposed to be functionnaly equivalent but we all know it’s not that easy and need to keep an eye on when they were done.
Having massive commits clutter history also looks like a good incentive to avoid massive commits in the first place.