a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
Wilfred Hughes 9cd63c972d Adding a changelog 2021-07-04 11:40:31 +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 Keep all sample files in sample_files/ 2021-07-04 11:10:16 +07:00
src Improve header display 2021-07-03 23:04:24 +07:00
.gitignore Initial proof of concept 2018-12-29 15:29:42 +07:00
CHANGELOG.md Adding a changelog 2021-07-04 11:40:31 +07:00
Cargo.lock Bump version for initial release 2021-07-03 23:09:11 +07:00
Cargo.toml More package metadata 2021-07-03 23:14:22 +07:00
README.md Note on difftool usage 2021-06-24 23:29:08 +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.