Our great sponsors
-
git-blameall
Shows every line that was ever in the file, along with information about when it was added or deleted.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I was looking at https://github.com/github/semantic for providing semantic diffs a while back and I still think it would be a good fit.
By looking at the diff between trees, you can ignore a lot of the extra noise like indentations, spaces and other styling changes.
I heartily recommend using `tig blame` from https://jonas.github.io/tig/ -- it allows you to interactively navigate the blame history; navigate to the line of interest, press one key to see details of the commit that last touched it. Not the right one? Press `,` to move to before that commit. Moving past bulk changes and finding the actual origin of a line of code is usually a breeze with this tool.
I don't use tig much otherwise, but for this purpose I've not yet seen a better (and faster!) tool.
I found great results using syntax highlighter token streams for diffs. In my PoC I was using Pygments. It's a great compromise for "almost semantic" diffs. Syntax highlighting tokenizers have great language support, are blazing fast (we use them constantly in real time in IDEs), and work far better in "degenerate" cases that don't entirely parse/compile yet such as work-in-progress code (again because we use them all the time in text editors).
https://github.com/WorldMaker/tokdiff