Difftastic
Compare source files by syntax rather than only changed lines.
Difftastic is a command-line comparison tool that uses syntax trees to display changes in source code and structured files. It integrates with Git and falls back to a line-oriented comparison when structural parsing is unavailable.
The tool is implemented in Rust and uses Tree-sitter parsers. Its output is intended for people reviewing changes, not for generating applicable patches or automatically merging files.
Choose a view for code review
Structural reading and patch export are different jobs. Try Difftastic on a disposable change while keeping native Git output.
Compare Difftastic vs git diff with a reproducible exercise →