Skip to content

Commit

Permalink
Mention merge conflicts in FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Aug 16, 2023
1 parent 8ac4398 commit a87ca9d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,27 @@ showing one way to use difftastic with magit.
Probably not. Difftastic is young. Consider writing a plugin for your
favourite tool, and I will link it in the README!

### Can difftastic help me with merge conflicts?

Yes! As of version 0.50, difftastic understands merge conflict markers
(i.e. `<<<<<<<`, `=======` and `>>>>>>>`).

Pass your file with conflicts as a single argument to
difftastic. Difftastic will construct the two conflicting files and
diff those.

```
$ difft file_with_conflicts.js
```

### Can difftastic do merges?

No. AST merging is a hard problem that difftastic does not address.

AST diffing is a also lossy process from the perspective of a text
diff. Difftastic will ignore whitespace that isn't syntactically
significant, but merging requires tracking whitespace.

### Can I use difftastic to check for syntactic changes without diffing?

Yes. Difftastic can check if the two files have the same AST, without
Expand Down

0 comments on commit a87ca9d

Please sign in to comment.