a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
Wilfred Hughes 6f87140703 Don't crash if file is unchanged
Fixes #4
2021-07-07 22:19:46 +07:00
.github/workflows Don't bother with clippy on CI for now 2021-03-07 14:10:44 +07:00
config Treat && || ++ -- and * as single tokens in JS 2021-07-07 22:13:23 +07:00
img Line up visible lines and include gaps if necessary 2021-07-07 22:01:19 +07:00
sample_files Add JSON to sample files 2021-07-05 13:13:47 +07:00
src Don't crash if file is unchanged 2021-07-07 22:19:46 +07:00
.gitignore Ignore data from perf when profiling 2021-07-05 13:17:05 +07:00
CHANGELOG.md Don't crash if file is unchanged 2021-07-07 22:19:46 +07:00
Cargo.lock Roll version for next release 2021-07-04 11:42:59 +07:00
Cargo.toml Roll version for next release 2021-07-04 11:42:59 +07:00
LICENSE Add LICENSE file 2021-07-04 11:41:39 +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.