summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2023-08-15 23:00:43 -0700
committerWilfred Hughes <me@wilfred.me.uk>2023-08-15 23:00:43 -0700
commita87ca9dd8765bcb4551273798338d69d22f2f347 (patch)
tree37ee1e8fcbdfe9dd2545db61b939ed80fb30f9eb
parent8ac4398c48e05a6438b309862373703ac8e052af (diff)
Mention merge conflicts in FAQ
-rw-r--r--README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3c241ae0c..cf7f46d4f 100644
--- a/README.md
+++ b/README.md
@@ -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