OmniDiff: Open-source Rust diff tool handles code, images, PDFs at 100ms speeds
Developer Ivan Kovic releases a fast, type-aware Git difftool supporting 25 languages and binary formats, built on analysis of real open-source repositories.
What to know
- OmniDiff is a new open-source Rust-based Git difftool that handles code (25 languages), images, PDFs, archives, and other file types with type-aware content diffing.
- Performance benchmarks show 100ms diff times for large C++ files; design is based on empirical analysis of 2,000 sampled diffs from real open-source repositories.
- Available under AGPLv3 with prebuilt binaries for Linux, macOS, and Windows; supports CLI, TUI, JSON output modes and integrates as a Git difftool.
Ivan Kovic OmniDiff creator and developer
How it unfolded 1 development · click the chart to see its coverage articlesposts
-
1
OmniDiff released as AGPLv3 open source with multiple installation options
The tool is available as open source under AGPLv3 license with prebuilt binaries for Linux, macOS (Intel and Apple Silicon), and Windows attached to GitHub releases. Installation options include source builds via Rust, Nix flakes, and packaging recipes for Arch and Gentoo.
“I have been researching what the ultimate diff tool would look like, based on actual diffs in open source repositories.”
— Ivan Kovic, OmniDiff developer · source -
Delta has a really nice way to show diffs with its diff-so-fancy mode, it's more similar to GitHub's UI where not only the line is colored up differently but there's a different shade of color to highlight the characters.There's a screenshot and video of it here that I wrote a while back…
2 more of the top 3 · 18 posts in this stretch
-
It would be nice if you checked out lazygit and consider adding support to it's recently added OSC1717, adding supporting for staging in the main diff view directly: https://github.com/stefanhaller/diff-line-metadata-specAlso it would be nice to have a more thorough and comprehensive comparison against difftastic, because I don't think there are…
-
Nicely done OP. Does it do 3-way diffs for merges as well? The instructions only mention the two-way `git difftool` configuration so maybe that'll be a future feature?Any interest in getting the setup upstreamed[1] so that users only need to `git config --global diff.tool omnidiff` to enable it by default? Disclosure: I created `git difftool` a…
-
-
background
OmniDiff claims 100ms performance on large files with content-aware diffing — The tool offers speed benchmarks showing it can diff C++ files of tens of thousands of lines in under 100ms on a 2023 ThinkPad T14s with Intel Core i7-1370P and 32GB RAM. OmniDiff uses type-aware diffing with context awareness, showing function/class locations for changes deep in large files.
-
background
Ivan Kovic releases OmniDiff on Hacker News — A developer announced OmniDiff, a new open-source Git difftool written in Rust, on Hacker News. The tool is designed to handle multiple file types including code (25 languages), config files, images, PDFs, archives, cursors, and fonts. The post describes performance benchmarks and technical implementation details.
Also covered reported alongside — the timeline has no entry for these yet
-
first by HN Best, 10d ago · also HN Frontpage
What people are saying 14 voices from 1 site · best of 18 · verbatim
- Nov 2
-
Feel free to subscribe to https://github.com/ivankovic/omnidiff/issues/62 to get notified when Lazygit support is added.An extremely thorough comparison against difftastic is in the research/ directory. I don't recommend reading it, unless you are really into diffs. Even describing the dataset takes a good half an hour.Multi-file support is on the…
-
An idea you can steal: turn common generated/lockfile diffs into something readable (a la
-
I'd be curious how it compares to BeyondCompare by Turtle Software. I've always been really impressed with their diffs and 3-way merges.
-
I tried using this as configured with `omnidiff git configure`, but when I use `git difftool` it shows me the entire file in the TUI and I have to scroll down to where diff is. Is this intended behavior? Setting `--context` seems to have no effect.
-
Comparing is slightly complicated but roughly speaking:Difftastic only diffs code, which is only 2/3 of all diffs.When only measured on stuff difftastic supports:Difftastic is perfect on 64% of diffs and near-perfect on 17% more.Omnidiff is perfect on 90% of diffs and near-perfect on 5% more.Speed isp50 - 35ms difftastic vs 4ms OmniDiff p99 -…
-
How does it compare to Difftastic[1]? Both built on top of TreeSitter and solve similar problems.[1]
-
It will crash.But so will every other tool, because it is things like a C++ header file with 128MB of PNG data hardcoded as an array.Editors don’t even open those files.
- Nov 1
-
> can diff 99.95% of code changesI’m not sure if I’m understanding this correctly : so for the remaining 0.05% of code changes, this tool would just… miss it? That seems horrible for a diff tool :O
-
For me the biggest issue is “git rebase” merge conflicts because the surrounding context was modified (especially near beginning/end of functions where the context includes unrelated stuff), or similar in a markdown document.(If commit A adds a line to the end of a bullet list in markdown and commit B does the same, they will conflict even though…
-
Is there a way to use it with git without having to change your global git config? I.e. `git diff | omnidiff` or something?You can do this with delta: `git diff | delta --side-by-side`
-
cool to see fresh Rust software with copyleft license !I feel safer, as a user, enjoying the freedoms that the AGPL provides me. (No evil middleman will be able to give me non-free versions of this program.)
-
This looks really good. It does look like you put a ton of effort into it, I'll give it a try.I feel like the moved code cases would look great in https://github.com/andunieee/twain, I was looking into how I could slurp your code and make it work there (although for some reason I have the impression that I had already seen this repository in the…
-
Wow, I've often wished I had a tool like this. Thanks!Since most people do click-and-run most of the time (based on decades long research, n=1), I'll just add paste the link for more examples:
-
Really well done, I like this a lot. It produces much more minimal diffs than other tools I've tried.One feature I miss from difftastic is showing diffs side-by-side on wide terminals, and unified when narrow.