https://github.com/Wilfred/difftastic Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Wilfred / difftastic Public * Notifications * Fork 47 * Star 4.3k a diff that understands syntax difftastic.wilfred.me.uk/ MIT License 4.3k stars 47 forks Star Notifications * Code * Issues 50 * Pull requests 6 * Actions * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 13 branches 26 tags Code Latest commit @Wilfred Wilfred Downgrade rpds to last Rust 2018 version ... d362242 Mar 29, 2022 Downgrade rpds to last Rust 2018 version This will allow difftastic to build on earlier rust versions, and is also a ~2% instruction count reduction on slow_before.rs. d362242 Git stats * 8,329 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Fix typo and clarify VCS Mar 21, 2022 img New screenshots and add screencast demo Mar 26, 2022 manual Configure language and fix highlighting for dart Mar 20, 2022 sample_files Discard '\n' nodes in C and C++ Mar 28, 2022 scripts Add a helper script for doing releases Jan 31, 2022 src Discard '\n' nodes in C and C++ Mar 28, 2022 vendor Update Clojure highlighting to match upstreamed PR Mar 27, 2022 .codecov.yml Disable 'patch' test coverage in GitHub status Sep 13, 2021 .gitattributes Ignore sample files for calculating GitHub code statistics Jan 17, 2022 .gitignore Ignore temporary file from comparison tool Feb 14, 2022 CHANGELOG.md Discard '\n' nodes in C and C++ Mar 28, 2022 CITATION.cff Add citation information Nov 23, 2021 Cargo.lock Downgrade rpds to last Rust 2018 version Mar 29, 2022 Cargo.toml Downgrade rpds to last Rust 2018 version Mar 29, 2022 LICENSE Roll year Feb 5, 2022 README.md Clarify textual diffing approach Mar 28, 2022 build.rs Add support for Dart Mar 20, 2022 text_diff_notes.md Add notes on LCS weaknesses Mar 21, 2021 View code Basic Example One Minute Demo Languages Known Issues Non-goals License README.md it's difftastic! manual crates.io codecov.io Difftastic is an experimental diff tool that compares files based on their syntax. See the manual to get started. Basic Example Screenshot of difftastic and JS In this JavaScript example, we can see: (1) Difftastic understands nesting. It highlights the matching { and }, but understands that foo() hasn't changed despite the leading whitespace. (2) Difftastic understands which lines should be aligned. It's aligned bar() on the left with bar(1) on the right, despite their changes. (3) Difftastic understands that line-wrapping isn't meaningful. "eric" is now on a new line, but it hasn't changed. One Minute Demo asciicast This one minute screencast demonstrates difftastic usage with both standalone files and git. Languages Difftastic supports the following languages: * Bash * C * C++ * C# * Clojure * Common Lisp * CSS * Dart * Elixir * Emacs Lisp * Go * Haskell * Java * JavaScript (and JSX) * JSON * OCaml * PHP * Python * Ruby * Rust * Scala * TypeScript (and TSX) If a file has an unrecognised extension, difftastic uses a textual diff with word highlighting. Known Issues Performance. Difftastic scales relatively poorly on files with a large number of changes, and can use a lot of memory. Display. Difftastic has a side-by-side display which usually works well, but can be confusing. Robustness. Difftastic regularly has releases that fix crashes. Non-goals Patching. Difftastic output is intended for human consumption, and it does not generate patches that you can apply later. Use diff if you need a patch. Merging. AST merging is a hard problem that difftastic does not address. License Difftastic is open source under the MIT license, see LICENSE for more details. Files in sample_files/ are also under the MIT license unless stated otherwise in their header. About a diff that understands syntax difftastic.wilfred.me.uk/ Topics tree-sitter diff Resources Readme License MIT License Stars 4.3k stars Watchers 21 watching Forks 47 forks Contributors 132 * @maxbrunsfeld * @Wilfred * @rewinfrey * @joshvera * @tclem * @robrix * @damieng * @ananthakumaran * @aosq * @aymannadeem * @patrickt + 121 contributors Languages * Rust 99.8% * Other 0.2% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.