Skip to content

display manual conflict resolution options in app #6062

Closed

Description

@ampinsk

Right now, we're treating binary files as simply resolved:

screen shot 2018-10-31 at 10 44 31 am

It would probably be more clear to treat them differently to let the user know that they may need to resolve these outside of Desktop, or even better, we could resolve these using an "ours/theirs" sort of approach in the dialog itself 🤔

I think we can probably address this after 1.5.0 but wanted to track this as a case 👍

Activity

  1. shiftkey commented on Oct 31, 2018

    @shiftkey
    Member

    let the user know that they may need to resolve these outside of Desktop,

    Yep, looks like we might need to tweak our detection of conflicts to handle these files.

    we could resolve these using an "ours/theirs" sort of approach in the dialog itself 🤔

    I'm into this idea for the sake of simplicity, and here's a quick writeup on how to resolve this on the command line (which we can steal for any eventual solution): https://stackoverflow.com/a/2163926

    git checkout --theirs -- path/to/conflicted-file.txt
    # or
    git checkout --ours -- path/to/conflicted-file.txt
    
  2. added
    bug
    on Oct 31, 2018
  3. shiftkey commented on Oct 31, 2018

    @shiftkey
    Member

    Marking this as priority-2 because we incorrectly consider them as resolved, and I'm pretty sure the merge won't actually complete successfully if the user tries it.

  4. added
    priority-2
    on Oct 31, 2018
  5. ampinsk commented on Oct 31, 2018

    @ampinsk
    ContributorAuthor

    I just tried it, and it looks like we do let you successfully complete a merge in this case, at least in the UI

  6. shiftkey commented on Oct 31, 2018

    @shiftkey
    Member

    @ampinsk I guess we just stage whatever is currently in the working directory (which could be it's own can of worms). Gonna try and put together a repro of this to test on my end and confirm. 🤷‍♂️

  7. self-assigned this
    on Oct 31, 2018
  8. outofambit commented on Oct 31, 2018

    @outofambit
    Contributor

    #6066 is the first iteration of this, while this issue will contain further refinement.

  9. added this to the 1.5.1 milestone on Oct 31, 2018
  10. added and removed
    bug
    priority-2
    on Oct 31, 2018
  11. shiftkey commented on Nov 1, 2018

    @shiftkey
    Member

    I started noodling on the UI changes for this building on top of #6066 and wanted to throw it open for feedback. With binary files the only typical options you have when merging conflicts is to choose your version of the file, or the one coming from the other branch.

    I started on a dumb UI to expose these options (no messing with styles just yet):

    Unlike merging conflicts in text files, we shouldn't immediately update the Git index with the choice you've made - because the file may disappear when you choose "ours". Instead, we should track the option in-memory and apply it before performing the merge.

    I'm open to UX ideas around making this friendly and avoid the Git porcelain, I think there will be some other scenarios like "the file you modified in this branch is deleted in the other branch" which I'll update this with while I'm verifying #6066 .

  12. shiftkey commented on Nov 1, 2018

    @shiftkey
    Member

    Moving it along a bit further, I can now pull in more context around the decision making process:

    screen shot 2018-11-01 at 4 38 57 pm

    The words themselves could be much more friendly (suggestions/improvements welcome):

    "Use the modified version from master" to update to the version from the other branch
    "Ignore the version on master" to prefer the change I made

    I'm not a huge fan of the dual buttons, and maybe a dropdown of the options here might give us more horizontal space for wording. When the user has chosen an option we could show a tick alongside to indicate no further work is needed.

  13. ampinsk commented on Nov 2, 2018

    @ampinsk
    ContributorAuthor

    We're trying to do this for 1.5.1, not 1.5.0 right? I can noodle on some designs for this 👍

  14. 18 remaining items

  15. added this to the 1.6.1 milestone on Dec 10, 2018
  16. msftrncs commented on Dec 12, 2018

    @msftrncs
    Contributor

    It might be desirable to include more options in the resolve drop-down, or similar interface, as per suggestions in #6385 for other files? In this case, maybe just 'reveal/show in finder/explorer'? I have not yet had to work with binary file conflicts, but I might imagine that a user might need to inspect the incoming file before choosing 'ours/theirs'.

  17. ampinsk commented on Dec 12, 2018

    @ampinsk
    ContributorAuthor

    @msftrncs we've been discussing combining these dropdown options internally, thanks for bringing it up! We'll likely get to this in future iterations 😄

  18. self-assigned this
    on Jan 7, 2019
  19. modified the milestones: 1.6.1, 1.6.0 on Jan 9, 2019
  20. timor-raiman commented on Feb 21, 2019

    @timor-raiman

    Great job, exactly what we needed in #5400 (comment) !!

  21. MarkBeharrell commented on Feb 14, 2023

    @MarkBeharrell

    Is there any way the list can be saved, shared or added to a commit?

    For instance, we have a long-running branch that I regularly update from trunk. During the update we create a branch from this and send that for a PR.

    Having the conflicts and resolutions in the commit would be helpful for the reviewers.

    It could be a simple as making the window with the conflicts resizable and text selectable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions