docs conflicts.md: clarify the revert example a bit

Yuya's suggestion from
<https://github.com/jj-vcs/jj/pull/6415#discussion_r2061122640>.

Co-authored-by:  Yuya Nishihara <yuya@tcha.org>
This commit is contained in:
Ilya Grigoriev 2025-04-25 19:45:07 -07:00
parent 1f14f7a0ff
commit 5a735182ac

View File

@ -57,9 +57,9 @@ rebased to head without resolving conflicts and still not get messy recursive
conflicts.
As another example, let's go through what happens when you back out a conflicted
commit. Let's say we have the usual `C+(B-A)` conflict on top of non-conflict
state C. We then revert that change. Reverting a change means applying its
reverse diff, so the result is `(C+(B-A))+(C-(C+(B-A)))`, which we can simplify
to just `C` (i.e. no conflict).
commit. Let's say we have the usual `E = C+(B-A)` conflict on top of
non-conflict state `C`. We then revert that change. Reverting a change means
applying its reverse diff `-(E-C)`, so the result is `E+(C-E) =
(C+(B-A))+(C-(C+(B-A)))`, which we can simplify to just `C` (i.e. no conflict).
[merge-rs]: https://github.com/jj-vcs/jj/blob/main/lib/src/merge.rs