smashwilson / merge-conflicts

Resolve git merge conflicts in Atom
https://atom.io/packages/merge-conflicts
MIT License
431 stars 42 forks source link

Add a "Keep Both" strategy? #185

Open al-the-x opened 8 years ago

al-the-x commented 8 years ago

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?

smashwilson commented 8 years ago

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.

al-the-x commented 8 years ago

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...

philipgiuliani commented 8 years ago

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 :/

smashwilson commented 8 years ago

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"?

al-the-x commented 8 years ago

:+1:

al-the-x commented 8 years ago

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

al-the-x commented 8 years ago

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

smashwilson commented 8 years ago

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

al-the-x commented 8 years ago

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

smashwilson commented 8 years ago

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?

al-the-x commented 8 years ago

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.

smashwilson commented 7 years ago

: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.