Skip to content

Add support for resolving conflicts#26

Open
adam-talos wants to merge 1 commit into
kkkev:masterfrom
adam-talos:add-resolve-conflicts-support
Open

Add support for resolving conflicts#26
adam-talos wants to merge 1 commit into
kkkev:masterfrom
adam-talos:add-resolve-conflicts-support

Conversation

@adam-talos
Copy link
Copy Markdown

@adam-talos adam-talos commented May 4, 2026

Summary

Adds the ability to detect merge conflicts in a repo and to resolve them using a 3 panel diff (Yours/Both/Incoming) in the same way as the git is handled in Idea.

  • Adds conflict detection by handling C status in JujutsuChangeProvider
  • Implements JjMarkerConflictExtractor to parse JJ's embedded conflict markers into MergeData (CURRENT/ORIGINAL/LAST) for three-way merge view
  • Implements JujutsuMergeProvider using the extractor and registers it with JujutsuVcs, so "Resolve Conflicts..." appears automatically in the Changes view

Details

JJ uses embedded conflict markers in files rather than git-style <<<<<<</>>>>>>> markers. This PR parses those markers and wires them into IntelliJ's standard 3-panel merge editor, providing the same "Resolve Conflicts..." UX that git users expect.

The ConflictExtractor interface is injectable for testability, and JjMarkerConflictExtractor is covered by TDD unit tests.

Test plan

  • Open a JJ repo with conflicted files in IntelliJ
  • Verify conflicted files show C status in the Changes view
  • Right-click a conflicted file → "Resolve Conflicts..." opens the 3-panel merge editor
  • Resolve the conflict and verify the file is updated correctly
  • Unit tests pass: ./gradlew test

@adam-talos adam-talos force-pushed the add-resolve-conflicts-support branch from f5b897e to 5448b7b Compare May 4, 2026 17:53
- Add conflict resolution design spec
- Add conflict resolution implementation plan
- Add conflict domain types, ConflictExtractor interface, and resolveList CLI command
- Add JjMarkerConflictExtractor with TDD
- Handle C status in JujutsuChangeProvider for conflict detection
- Add JujutsuMergeProvider and register with JujutsuVcs
- Polish conflict resolution feature: injectable extractor, lint, dead code
@adam-talos adam-talos force-pushed the add-resolve-conflicts-support branch from 5448b7b to 97bd7fe Compare May 13, 2026 19:43
@kkkev
Copy link
Copy Markdown
Owner

kkkev commented May 14, 2026

Thank you very much for this pull request! Conflict resolution has been on the backlog for a while, and this is a great step change for this plugin. I'll take a look over the next few days and hopefully get it merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants