News for hackers. Stuff that matters.
Re:Show HN: OmniDiff – Opensource, super fast, content aware... by p_wood on Monday November 02, 2026 @11:23AM (#50339193)
> It’s much much better with moved code. > Delta adds color to the standard git diff algorithm.

Git will highlight moved code and delta shows that, so how does OmniDiff differ from

    git diff --color-moved=zebra --color-moved-ws=allow-indentation-change
Re:Show HN: OmniDiff – Opensource, super fast, content aware... by FabCH on Tuesday November 03, 2026 @05:42AM (#50350312)
Partially.

The default git diff uses the Myers diff algorithm as implemented in xdiff. It's a line based diff with some pre and post processing for better results.

The move detection is a post-processing step that only works on lines and additionally only works if you also enable coloured output.

It can't match "moved-but-eddited" code and it can't match "this one log line was copied 3 times in the new code" or the refactoring equivalent "these 2 blocks of code were merged into one reusable function".

You have to use more syntax-aware algorithms to get true move detection. OmniDiff matches the nodes of the AST to get some of that syntax awareness.