mirror of
https://github.com/jj-vcs/jj.git
synced 2026-07-10 19:43:40 +08:00
The original idea was to flatten left/right conflict trees and pair up adjacent negative/positive terms. For example, diff(A, B-C+D) could be rendered as diff(A, B) and diff(C, D). The problem of this formalization is that one of the diff pairs is often empty (because e.g. A=B), so the context is fully omitted. The resulting diff(C, D) doesn't provide any notion why the hunk is conflicted, and how it is different from A. Instead, this patch implements diffs in which each left/right pair is compared. In the example above, the left terms are padded, and the diffs are rendered as diff(A, B), diff(-A, -C), diff(A, D). This appears to be working reasonably well so long as either side is resolved or both sides have the same numbers of terms. Closes #4062
5.5 KiB
5.5 KiB