merge-conflicts icon indicating copy to clipboard operation
merge-conflicts copied to clipboard

Add a "Keep Both" strategy?

Open al-the-x opened this issue 10 years ago • 12 comments

The "Keep Left" / "Keep Right" option is occasionally useful; often I need a combination of Left and Right. Most graphically diff-ing tools support a "Keep Both" option that allows me to slot the Left changes ahead or behind the Right changes. Would you consider adding this feature?

al-the-x avatar Oct 14 '15 23:10 al-the-x

It already exists :grin:

Right-click anywhere in the conflict and you can choose to resolve "ours then theirs" or "theirs then ours" from the context menu.

smashwilson avatar Oct 15 '15 00:10 smashwilson

Ah, good to know! It wasn't immediately obvious, though... Maybe an auxiliary button in the UI that indicates that other actions are available would be nice? Happy to submit some more concrete ideas (pics and code), if you're interested...

al-the-x avatar Oct 22 '15 12:10 al-the-x

I also didn't knew about this option and missed it so often. Cool that it exists. Maybe it should be a button. Its not so obvious that you have to right-click in the conflict :/

philipgiuliani avatar Oct 30 '15 08:10 philipgiuliani

Yah, I've been thinking about revisiting the conflict-marker UI a little, and this is one of the considerations. Maybe a gear that exposes the menu for "other resolutions"?

smashwilson avatar Oct 30 '15 12:10 smashwilson

:+1:

al-the-x avatar Oct 31 '15 00:10 al-the-x

Interested in a PR for this? Point me in the right direction...

al-the-x avatar Dec 01 '15 16:12 al-the-x

Ping @smashwilson: Any progress on a UI improvement for "Keep Both" as suggested in this thread?

al-the-x avatar Feb 01 '16 15:02 al-the-x

Nope, sorry, I haven't had chance to allocate time to this for a while now (day job, you know).

smashwilson avatar Feb 01 '16 19:02 smashwilson

Totally. Point me in the right direction for a PR?

al-the-x avatar Feb 01 '16 20:02 al-the-x

Well, the view that owns the controls is SideView; I've highlighted the markup generation. The resolution commands are defined and implemented in ConflictedEditor. That should get you started, I think?

smashwilson avatar Feb 01 '16 20:02 smashwilson

Thanks, yes. That demystifies a lot. I haven't done any work on an Atom plugin yet, but I'm eager to learn. I'll fork and open a PR this week.

al-the-x avatar Feb 02 '16 21:02 al-the-x

:wave: Thanks for taking the time to file an issue here! Unfortunately, this repository is being deprecated, so I won't be getting to this one here.

This one should be taken care of by the new git and GitHub package for Atom. We have "ours then theirs" and "theirs then ours" options in a drop-down menu on the conflict itself, so hopefully it'll be a bit more discoverable.

smashwilson avatar May 16 '17 18:05 smashwilson