Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust ...

@show

Show HN: OmniDiff – Opensource, super fast, content aware Git difftool, in Rust github.com · 192 points · 45 comments · HN thread

TL;DR OmniDiff is a new open-source (AGPLv3) diff tool written in Rust by Marko Ivankovic, v0.3.0, that diffs source code structurally with tree-sitter for 25 languages and also diffs images, PDFs, fonts, cursors, archives and message catalogs by content. The author reports median diffs under 5 ms on a ThinkPad T14s, and measured accuracy against hand-labelled ground truth; it is installable via cargo, Homebrew, apt, Nix, and integrates with git difftool, git diff via GIT_EXTERNAL_DIFF, and jj.

  • Structural code diffing for 25 languages using tree-sitter grammars, with a headless mode for plain-text output and a TUI viewer for interactive use.
  • Non-text content is diffed by what it holds: pictures pixel by pixel, PDFs page by page, fonts glyph by glyph, archives member by member.
  • Reported performance: p50 4.2 ms and p99 177 ms on 2,302 fixtures; 100ms is the 97.6th percentile; PDFs are the slowest content type with only 57% under 100ms.
  • Reported accuracy: 90% of code test cases with zero mismatched bytes under the --minimal preset is not met yet; the author says 90% zero-mismatch and 99% at-most-1% targets are not yet met (60% and 87.5% for --full).
  • Robustness: 99.95% of 442,530 code file pairs from about 7,500 Gentoo-listed repositories diffed without failure within a 120 s budget.
  • Install paths include cargo install, Homebrew, a signed apt repo, Nix, and prebuilt binaries; a VS Code extension is available but waits on an unreleased VS Code API.
  • Code is AGPLv3 with a paid commercial license via GitHub Sponsors; contributions are currently not accepted.

Discussion The thread mixes praise for the project's ambition and speed with practical questions about packaging, integration with git and other tools, and comparisons to Delta and Difftastic. The author answers many questions directly, including about algorithm choice, licensing and AI-assisted authorship. Mood is mostly positive and curious, with some skepticism about whether the output is actually better and a long side discussion about AGPL, AI-generated code copyright and licensing strategy.

  • Interested and impressed by the idea of a language-aware differ (many): Several commenters say they have wanted a tool like this and find the examples and move detection promising. Praise is aimed at the project's effort and the structural approach.
  • Comparison with Delta and Difftastic favours OmniDiff on moved code (some): The author says about a third of diffs are significantly better than Delta and that OmniDiff handles moved functions where text diffs show delete and insert. A commenter cites Difftastic as an alternative with a different license and claims OmniDiff's accuracy numbers are higher on shared content.
  • Packaging and installation friction is a real barrier (some): Commenters point out that Delta is available through standard package managers across platforms while OmniDiff needs several different install paths. The author responds that the AUR is closed and that Homebrew commands for Linux can be added.
  • AGPL license choice hurts adoption or is a good choice (some): One commenter argues AGPL plus donations will stall adoption and that a BSD competitor might win. Others support copyleft and say they prefer GPL tools; the author says the choice is political.
  • Doubts about AI-generated code and copyright (a few): A commenter argues copyleft is weak if AI wrote much of the code, and another suggests clean-room reimplementation via AI could bypass the license. The author says the core parts were human-written and that the code is not a legal matter for his jurisdiction.
  • Output not clearly better than existing diffs (a few): One commenter says they are not convinced the examples look better than standard diff output and feels out of step with enthusiastic replies. Another reports getting a single-column output when using the git difftool setup.

Links from the comments

#diff #rust #git #opensource #tooling