All Projects → Wilfred → difftastic

Wilfred / difftastic

Licence: MIT License
a syntax-aware diff 🟥🟩

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to difftastic

tmux-eaw-fix
tmux 2.6 以降において East Asian Ambiguous Character を全角文字の幅で表示する
Stars: ✭ 16 (-99.06%)
Mutual labels:  diff
array-diff-multidimensional
Compare the difference between two multidimensional arrays in PHP
Stars: ✭ 60 (-96.47%)
Mutual labels:  diff
spellsitter.nvim
Treesitter powered spellchecker
Stars: ✭ 251 (-85.24%)
Mutual labels:  tree-sitter
tree-sitter-vue
Vue grammar for tree-sitter
Stars: ✭ 38 (-97.77%)
Mutual labels:  tree-sitter
wenaox
🐬 A light weight and good performance micro channel small program state management library
Stars: ✭ 33 (-98.06%)
Mutual labels:  diff
ecto diff
Generates a data structure describing the difference between two ecto structs
Stars: ✭ 22 (-98.71%)
Mutual labels:  diff
tainted
Tool to determine which Go packages need to be rebuilt in a monorepo
Stars: ✭ 53 (-96.88%)
Mutual labels:  diff
reducer-tester
Utilities for testing redux reducers
Stars: ✭ 19 (-98.88%)
Mutual labels:  diff
Aehnlich
Show/Merge differences in directories and their content (text files) in Light/Dark designs
Stars: ✭ 73 (-95.71%)
Mutual labels:  diff
tree-sitter-rescript
ReScript parser for Tree-Sitter
Stars: ✭ 20 (-98.82%)
Mutual labels:  tree-sitter
magit-diff-flycheck
Flycheck for Magit diff buffers!
Stars: ✭ 24 (-98.59%)
Mutual labels:  diff
Differ
Swift library to generate differences and patches between collections.
Stars: ✭ 612 (-64.02%)
Mutual labels:  diff
tree-edit
🌲 Structural editing in Emacs for any™ language!
Stars: ✭ 211 (-87.6%)
Mutual labels:  tree-sitter
tree-sitter-clojure
No description or website provided.
Stars: ✭ 71 (-95.83%)
Mutual labels:  tree-sitter
treediff-rs
Extract differences between arbitrary datastructures
Stars: ✭ 52 (-96.94%)
Mutual labels:  diff
gitree
Print a directory tree that shows Git status and ignores files dictated by .gitignore.
Stars: ✭ 32 (-98.12%)
Mutual labels:  diff
tailor
Infrastructure as Code for OpenShift
Stars: ✭ 12 (-99.29%)
Mutual labels:  diff
tree-sitter-kotlin
Kotlin grammar for Tree-Sitter
Stars: ✭ 35 (-97.94%)
Mutual labels:  tree-sitter
tree-sitter-yaml
YAML grammar for tree-sitter
Stars: ✭ 29 (-98.3%)
Mutual labels:  tree-sitter
pg-diff
PostgreSQL schema and data comparing tool
Stars: ✭ 39 (-97.71%)
Mutual labels:  diff

it's difftastic!
crates.io codecov.io manual

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

See the manual to get started.

Demo 1: Wrapping Expressions

Difftastic understands expression nesting. If you wrap an expression in an if statement, difftastic understands that the inner values are unchanged.

Elisp screenshot

Compare this with git's default diff. It is confused by indentation changes, and doesn't know which closing parenthesis has been added.

Elisp comparison screenshot

Demo 2: Reflowing Code

Difftastic is robust to code formatting changes. If you change how many items appear on a single line, difftastic will only show you items which have changed.

Rust screenshot

In git's default diff, it's harder to see that iter and the curly braces are unchanged. It's also harder to see the affected line numbers.

Rust comparison screenshot

Languages

Difftastic supports the following languages:

  • Bash
  • C
  • C++
  • C#
  • Clojure
  • Common Lisp
  • CSS
  • Elixir
  • Emacs Lisp
  • Go
  • Haskell
  • Java
  • JavaScript (and JSX)
  • JSON
  • OCaml
  • Python
  • Ruby
  • Rust
  • Scala
  • TypeScript (and TSX)

If a file has an unrecognised extension, difftastic uses a line-oriented diff.

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.

Diff accuracy. Some delimiter moves are currently ignored (see #30).

Non-goals

Patch files. If you want to create a patch that you can later apply, use diff. Difftastic ignores whitespace, so its output is lossy. (AST patching is also a hard problem.)

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].