a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
Wilfred Hughes ad76bb9db9 Use equal_content for PartialEq on Node 2021-07-03 11:58:04 +07:00
.github/workflows Don't bother with clippy on CI for now 2021-03-07 14:10:44 +07:00
config : and ; are punctuation in CSS 2021-06-22 21:48:34 +07:00
img Expand readme and add screenshot 2021-06-22 00:30:58 +07:00
sample_files Making the JS sample file more interesting 2019-11-18 17:59:04 +07:00
src Use equal_content for PartialEq on Node 2021-07-03 11:58:04 +07:00
.gitignore Initial proof of concept 2018-12-29 15:29:42 +07:00
Cargo.lock Embed syntax.toml in binary 2021-06-20 16:32:22 +07:00
Cargo.toml Embed syntax.toml in binary 2021-06-20 16:32:22 +07:00
README.md Note on difftool usage 2021-06-24 23:29:08 +07:00
after.js Adding a modified list to a sample file 2019-01-16 09:42:16 +07:00
before.js Adding a modified list to a sample file 2019-01-16 09:42:16 +07:00
text_diff_notes.md Add notes on LCS weaknesses 2021-03-21 13:34:01 +07:00

README.md

It's Difftastic!

Difftastic is an experimental structured diff tool that compares files based on their syntax.

screenshot

It is very much unfinished. It works reasonably on very parenthesised data (lisps, JSON), it works sometimes on other languages with sufficient parentheses (Rust, JS), and falls back to a line-oriented diff otherwise.

See config/syntax.toml to see how languages are defined.

The wiki includes a thorough overview of alternative diffing techniques and tools.

Testing with Git

[diff]
        tool = difftastic

[difftool "difftastic"]
        cmd = ~/projects/difftastic/target/debug/difftastic "$LOCAL" "$REMOTE"

You can then run git difftool -y to see the current repo changes in difftastic.