Skip to content

feat(ediff): add majutsu-ediff integration#26

Open
0WD0 wants to merge 3 commits intomajutsu-annotatefrom
majutsu-ediff
Open

feat(ediff): add majutsu-ediff integration#26
0WD0 wants to merge 3 commits intomajutsu-annotatefrom
majutsu-ediff

Conversation

@0WD0
Copy link
Owner

@0WD0 0WD0 commented Jan 29, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 29, 2026 12:03
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch majutsu-ediff

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@0WD0 0WD0 changed the title Majutsu ediff feat(ediff): add majutsu-ediff integration Jan 29, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Ediff integration and conflict resolution support to Majutsu, an Emacs interface for the Jujutsu (jj) version control system. The changes replace the previous majutsu-diffedit functionality with a more comprehensive ediff-based solution and add native support for parsing and highlighting JJ-style conflict markers.

Changes:

  • Adds majutsu-ediff.el with ediff integration for comparing revisions, resolving conflicts, and interactive diffedit
  • Adds majutsu-conflict.el with parser and minor mode for JJ-style conflict markers (diff, snapshot, and git styles)
  • Refactors selection clearing logic across multiple transient commands to use centralized majutsu-selection-clear
  • Removes old diffedit implementations and updates transient menus

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
majutsu-ediff.el New file providing ediff integration for revision comparison and conflict resolution
majutsu-conflict.el New file with conflict marker parser, font-lock support, and minor mode for JJ conflicts
test/majutsu-ediff-test.el Test suite for ediff diff range parsing
test/majutsu-conflict-test.el Comprehensive tests for conflict parsing and font-lock
majutsu.el Updates transient menu to use new ediff command, adds requires for new modules
majutsu-diff.el Removes old diffedit functions, adds conflict resolution command, fixes section type bug
majutsu-evil.el Adds evil keybindings for conflict mode
majutsu-file.el Removes circular dependency, adds file reading utilities
majutsu-squash.el Refactors to use centralized selection clearing, updates selection faces
majutsu-split.el Refactors file selection to use transient-files, removes custom fileset logic
majutsu-restore.el Refactors file selection similarly to split
majutsu-rebase.el Updates selection faces for consistency
majutsu-new.el Consolidates selection clearing
majutsu-duplicate.el Consolidates selection clearing
majutsu-log.el Refactors file path handling to use transient-files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

For conflicts with more than 2 sides, fall back to `majutsu-conflict'."
(interactive)
(let* ((file (or file
(majutsu-file-at-point)
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function majutsu-file-at-point is not defined anywhere in the codebase. This should likely be majutsu-section-file-at-point which is defined in majutsu-section.el.

Copilot uses AI. Check for mistakes.
(defun majutsu-ediff-resolve-with-conflict ()
"Resolve conflicts using `majutsu-conflict-mode'."
(interactive)
(let* ((file (or (majutsu-file-at-point)
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function majutsu-file-at-point is not defined anywhere in the codebase. This should likely be majutsu-section-file-at-point which is defined in majutsu-section.el.

Copilot uses AI. Check for mistakes.
:class 'transient-files
:key "--"
:argument "--"
:prompt "Limit to file,s: "
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in prompt string: "file,s" should be "files"

Suggested change
:prompt "Limit to file,s: "
:prompt "Limit to files: "

Copilot uses AI. Check for mistakes.
:class 'transient-files
:key "--"
:argument "--"
:prompt "Limit to file,s: "
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in prompt string: "file,s" should be "files"

Suggested change
:prompt "Limit to file,s: "
:prompt "Limit to files: "

Copilot uses AI. Check for mistakes.
:class 'transient-files
:key "--"
:argument "--"
:prompt "Limit to file,s: "
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in prompt string: "file,s" should be "files"

Suggested change
:prompt "Limit to file,s: "
:prompt "Limit to files: "

Copilot uses AI. Check for mistakes.
(majutsu-ediff-show-revision (majutsu--normalize-id-value (oref it value))))
(t
(let* ((range (majutsu-ediff--current-range))
(file (majutsu-file-at-point)))
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function majutsu-file-at-point is not defined anywhere in the codebase. This should likely be majutsu-section-file-at-point which is defined in majutsu-section.el and handles file sections properly.

Suggested change
(file (majutsu-file-at-point)))
(file (majutsu-section-file-at-point)))

Copilot uses AI. Check for mistakes.
@0WD0 0WD0 force-pushed the majutsu-annotate branch from 85f042d to db956a1 Compare January 29, 2026 12:20
@0WD0 0WD0 force-pushed the majutsu-ediff branch 2 times, most recently from 0e8d69b to 86d0e98 Compare January 29, 2026 12:31
@0WD0 0WD0 force-pushed the majutsu-annotate branch from db956a1 to dca9db8 Compare January 29, 2026 12:31
@0WD0 0WD0 force-pushed the majutsu-annotate branch from dca9db8 to 389975a Compare January 29, 2026 13:07
@0WD0 0WD0 force-pushed the majutsu-ediff branch 2 times, most recently from 65c2f16 to e8a59a7 Compare January 29, 2026 22:34
@0WD0 0WD0 force-pushed the majutsu-annotate branch from 389975a to 5f0afa0 Compare January 29, 2026 22:34
@0WD0 0WD0 force-pushed the majutsu-annotate branch from 5f0afa0 to f1a722f Compare January 30, 2026 22:40
@0WD0 0WD0 force-pushed the majutsu-annotate branch from f1a722f to 22205bd Compare January 30, 2026 23:12
@0WD0 0WD0 force-pushed the majutsu-annotate branch 2 times, most recently from 07bcfaa to d3c5664 Compare January 31, 2026 03:30
@0WD0 0WD0 force-pushed the majutsu-annotate branch from d3c5664 to 7aef861 Compare January 31, 2026 03:51
@0WD0 0WD0 force-pushed the majutsu-annotate branch from 7aef861 to e6e96e8 Compare February 1, 2026 08:02
@0WD0 0WD0 force-pushed the majutsu-ediff branch 2 times, most recently from 4c70f48 to 9523da8 Compare February 1, 2026 08:06
@0WD0 0WD0 force-pushed the majutsu-annotate branch from e6e96e8 to e290101 Compare February 1, 2026 08:06
@0WD0 0WD0 force-pushed the majutsu-annotate branch from e290101 to 0d6a949 Compare February 1, 2026 08:51
0WD0 added 3 commits February 5, 2026 09:17
- Add transient-files argument for filesets in diff, log, restore, split
- Unify clear-selections to majutsu-selection-clear
- Add majutsu-read-files for file completion
- Add majutsu-conflict.el for parsing jj conflict markers
- Support diff, snapshot, and git conflict styles
- Add font-lock highlighting for conflict regions
- Add smerge integration for conflict resolution
- Add evil keybindings for conflict navigation
- Add majutsu-conflict-test.el
- Add majutsu-ediff.el for ediff-based conflict resolution
- Parse conflicted file list from jj status
- Support ediff sessions for resolving conflicts
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.

1 participant