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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add another way to resolve merge conflicts with Meld #3109
base: main
Are you sure you want to change the base?
Add another way to resolve merge conflicts with Meld #3109
Changes from all commits
f4f10b8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried making the first of these a proper merge tab (with or without auto-merge)? I'm guessing it doesn't work?
If it worked, there wouldn't be a need to pre-populate the output pane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually find this merge view with
jj
's conflict presentation in the middle confusing; the wayjj
currently shows merge conflict becomes misleading in the central tab.Of the two other tabs, only one is actually useful in this case of rebase:
It really makes it seem like "impl Input..." is the base unless you think about it carefully.
From this, you can tell that this commit renames an identifier.
The other one is not very useful (for a rebase merge conflict, at least):
There's this weird fact that even though it's clear what the files are in the two extra tabs, each tab is confusing on its own.
I think I'm still OK with using this as an "experimental" merge view, unless we come up with something better, but I'm thinking about putting more warnings in the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem I have with Meld’s 3-pane merging mode is that, when there is a conflict (an area marked with red background), it stops highlighting the character-level changes and leaves you an opaque wall of code in which to hunt for changes, as in a Find The Differences game:
meld left base right -o output --auto-merge
This is not what I signed up for when I launched a GUI app.
If you know how to read JJ’s conflict markers, then at least you get some line-level hints with
merge-tool-edits-conflict-markers = true
. This is the first tab ofmeld-3
:meld left output right
I presume I don’t need to explain the conflict markers here. Just remember that the part with
) and removed (
+++++++
will be identical to one of the sides, the context (-
) lines in the%%%%%%%
part come from the base, and the added (+
) lines would be from the side that was not chosen for+++++++
. Older versions of Meld would have made it more obvious, as they did not have the red background for conflicts, and identical parts used to be not highlighted.Going back to my pain point, the lack of character-level highlighting in 3-pane mode, this is what the other two tabs are for. They let you see the changes each side had made, highlighted nicely. Normally, only the “local” (right) side will be interesting, because these are the changes we would like to apply. It is perfectly normal in my workflow to ignore the middle tab, though sometimes I do like to peek into what the “other” (left) side was doing.
Side note: Using the 3-pane mode without
--auto-merge
should be reserved for pathological cases where automatic merging does the wrong thing:meld left base right -o output
I hope I covered all of your concerns. Now I will take it unto myself to distil it down to a few succinct words to include in the TOML comment and in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this problem, and it makes sense to me that showing the two extra tabs helps with it.
However, it would make more sense to me if the first tab (3-pane one) would just show the normal Meld merge view, with
--auto-merge
:It seems less confusing than the view your current setup shows as the first tab. On the other hand, I'm not sure whether Meld can show merge tabs and diff tabs at the same time.
If what I suggest were possible, the only difference between the
meld
andmeld-3
merge tools would be the two extra tabs.If it's not possible, we can go with what you have now and hope to improve it later.
A somewhat out-there option, especially if Meld cannot show merge tabs and diff tabs at the same time, would be to teach
jj
to produce different kinds of conflict markers. For example, I think that Git-style conflict markers would be less confusing in this UI.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I know I said I'm thinking about putting more warnings in the description, but your text LGTM at the moment. I think you improved it a bit since I last looked (👍 ), but it was quite clear before as well. We can always improve it later if needed. It'd take me effort to try to add warnings without making it less clear, and it's quite possible that I'd conclude that it's better as is if I tried.