Detecting Conflicts
JJ marks conflicts in the log with a "conflict" label. Expanding the revision shows each exact conflicted path together with its conflict side count.
Entering Conflict Mode
You can enter conflict handling from multiple places:
- Key: m in the Ediff transient (majutsu-ediff-resolve)
Use the automatic resolve strategy.
- Key: M in the Ediff transient (majutsu-ediff-resolve-with-conflict)
Force the conflict workflow. This opens the working-copy file (or a revision blob buffer for non-working-copy revisions), enables
majutsu-conflict-mode, and jumps to the first conflict.- Command: majutsu-conflict-ensure-mode
Enable conflict handling in a file with conflict markers.
majutsu-conflict auto-detects marker styles:
JJ conflict markers (
%%%%%%%/+++++++/-------) -> enablemajutsu-conflict-mode.JJ long conflict markers (e.g., 15-char marker runs) are treated the same as normal markers.
JJ conflicts with missing terminating newline markers are parsed with jj's newline-compensation semantics.
Git-style markers (
|||||||/=====) only -> enablesmerge-mode.
majutsu-conflict-mode Commands
Vanilla bindings use the prefix C-c ^:
- Key: n / p (majutsu-conflict-next / majutsu-conflict-prev)
Jump to the next or previous conflict.
- Key: b (majutsu-conflict-keep-base)
Keep the conflict base (snapshot / rebase destination section).
- Key: 1..9 (majutsu-conflict-keep-side)
Keep side N (the "after" side in JJ diff blocks).
- Key: M-1..M-9 (majutsu-conflict-keep-side)
Keep side N's "before" variant.
- Key: R (majutsu-conflict-refine)
Refine conflict regions with word-level highlighting.
Evil bindings are available in Normal state:
- Key: ]] / gj (majutsu-conflict-next)
Jump to the next conflict.
- Key: [[ / gk (majutsu-conflict-prev)
Jump to the previous conflict.
- Key: gb (majutsu-conflict-keep-base)
Keep the base.
- Key: gr 1..9 (majutsu-conflict-keep-side)
Keep side N (the "after" side).
- Key: gR 1..9 (majutsu-conflict-keep-side)
Keep side N's "before" variant.
- Key: ge (majutsu-conflict-refine)
Refine the conflict.