Support jj 0.37+ detailed conflict marker format - #45
Merged
Conversation
Owner
|
Thanks for working on this! I just installed jj I compiled this branch and the LSP could not find the conflict. Can you take a look at this? |
nertzy
force-pushed
the
support-new-conflict-markers
branch
4 times, most recently
from
February 27, 2026 17:50
ff87bf9 to
fa5aaff
Compare
Contributor
Author
|
@nilskch updated to better support your use case where the conflict is at the beginning of the file (there was an existing bug where the first line was not being tested). |
Since jj 0.37.0, conflict markers include detailed labels with change IDs, commit hashes, and descriptions instead of the previous generic "side #N" labels. The markers also changed from uppercase "Conflict" to lowercase "conflict". Since jj 0.25.0, conflict markers may be longer than 7 characters. Update all conflict marker regexes to handle: - Case-insensitive start/end markers (conflict vs Conflict) - Detailed labels on %%%%%%% and +++++++ lines (e.g. "diff from: rlvkpnrz 2f040964 (description)") - Multi-line labels via \\\\\\\ continuation lines - Markers longer than 7 characters (e.g. <<<<<<<< for files that already contain 7-character marker-like lines) Relevant jj changelog entries: - 0.37.0: https://github.com/jj-vcs/jj/blob/main/CHANGELOG.md#0370---2026-01-07 "Conflict labels now contain information about where the sides of a conflict came from" "The diff conflict marker style can now use \\\\\\\ markers to indicate the continuation of a conflict label" - 0.25.0: https://github.com/jj-vcs/jj/blob/main/CHANGELOG.md#0250---2025-01-01 "Conflict markers are now allowed to be longer than 7 characters"
nertzy
force-pushed
the
support-new-conflict-markers
branch
from
February 27, 2026 18:01
fa5aaff to
7fc15ab
Compare
nilskch
approved these changes
Mar 1, 2026
nilskch
left a comment
Owner
There was a problem hiding this comment.
Thank you and awesome catch :)
Owner
|
I've sent you an invitation to become a collaborator. Feel free to just merge things like this in the future. I now work in a much smaller team and rarely have conflicts anymore, so I didn't notice that the conflict markers changed in recent jj versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since jj 0.37.0, conflict markers include detailed labels with change IDs, commit hashes, and descriptions instead of the previous generic
side #Nlabels. The start/end markers also changed from uppercaseConflictto lowercaseconflict. Since jj 0.25.0, markers may be longer than 7 characters.Before (jj < 0.37):
After (jj 0.37+):
Changes:
conflictvsConflict)%%%%%%%and+++++++lines (not justChanges from.../Contents of...)\\\\\\\continuation lines used for multi-line conflict labels<<<<<<<<for files already containing 7-char marker-like lines)Test coverage: New
test_diff_two_sides_detailedsnapshot test with realistic jj 0.37+ conflict output, plus expanded regex pattern tests covering classic, detailed, and extended-length formats.Relevant jj changelog entries:
\\\\\\\markers to indicate the continuation of a conflict label"