Skip to content

merge conflicts state allows to keep making more merges? #6429

Open

Description

@msftrncs

Description

Closing the guided conflicts modal reveals that additional merges (or even the same merge again) can be attempted, but results in GIT errors. I suspect that undo or revert could be bad ideas at this time too. Error messages are given (hinting conflicts need resolved first), and nothing bad seems to happen.

UNDO could be worse, as it just automatically merges the undo in to your working tree, with the conflict banner remaining on screen, but no conflicts present (via icons) though the original conflicted file remains as if it were conflicted. (see below)

Version

  • GitHub Desktop: 1.5.1-beta5 (but self-built using Node 10)
  • Operating system: Win 10 18298 preview

Steps to Reproduce

  1. close the merge conflict modal
  2. attempt another merge because all the merge buttons are still enabled.

Expected Behavior

I might expect only finishing or aborting the current merge would be possible, or that doing some things should bring up the 'abort conflicted merge' flow (confirmation that is really want you want to do, then unwind the conflicted merge) before continuing.

Actual Behavior

The merge buttons attempt to merge more changes, or even the same changes again, but results in GIT errors.

Additional Information

Keep in mind that my understanding of conflict resolution is limited as I have not dealt a lot with it. I was testing the latest beta since it added the 'close guided conflict modal' feature.

merge button enabled for the exact same merge I just attempted that I am still in conflict resolution for.
image

Merge conflict markers not treated special, is it not supposed to be?
image

After pressing 'undo'... yikes, how am I going to fix this? (good its just a sandbox!)
The conflict banner went away when I closed Desktop and reopened it, and the guided conflict modal did not reopen either.
image

Activity

  1. shiftkey commented on Dec 17, 2018

    @shiftkey
    Member

    @outofambit @iAmWillShepherd I see you were both involved with #6382 - want to have a read of this and see if it's something you're aware of?

  2. added
    investigation-needed
    on Dec 17, 2018
  3. outofambit commented on Dec 17, 2018

    @outofambit
    Contributor

    #6428 should help with this, but i’m not sure that it’s a complete solution

  4. tierninho commented on Dec 17, 2018

    @tierninho
    Contributor
    • Not sure of the right flow, but if you were to X the merge conflict modal, and attempt to merge another branch, a git error is shown telling the user that there are unresolved conflicts.
    error: Merging is not possible because you have unmerged files.
    hint: Fix them up in the work tree, and then use 'git add/rm <file>'
    hint: as appropriate to mark resolution and make a commit.
    fatal: Exiting because of an unresolved conflict.
    

    Seems correct 🤔

    • If you were X the merge conflict modal, and click undo the merge banner is still there but disappears if you click view conflicts. Not sure what is supposed to happen in this case.
  5. tierninho commented on Dec 17, 2018

    @tierninho
    Contributor

    Areas of Desktop that could be disabled when the Merge Conflict banner is present are:

    • Repository > Push
    • Repository > Pull
    • Branch > New Branch
    • Branch > Update from [default]
    • Branch > Compare to Branch (and all related buttons that take you to same modal)
    • Branch > Merge into Current branch
    • Undo button (note: if you were to partially fix conflict and commit, you might need this button...)

    Questionable ones to disable:

    • GitHub Desktop > Preferences
    • Repository > Repository settings (⚠️ you can edit your Git ignore file here... got error: Entry '.gitignore' not uptodate. Cannot merge. fatal: Could not reset index file to revision 'HEAD'.)
    • Branch > Rename
    • Branch > Delete
  6. billygriffin commented on Dec 18, 2018

    @billygriffin
    Contributor

    I wanted to also be sure to track this here as it's related to the state you're in during a conflict: #6428 (comment)

  7. added this to the 1.6.0 milestone on Dec 18, 2018
  8. billygriffin commented on Jan 14, 2019

    @billygriffin
    Contributor

    @desktop/design Would you mind taking a look at this and helping us align on what users should or should not be able to do during a merge conflict?

  9. modified the milestones: 1.6.0, 1.6.1 on Jan 14, 2019
  10. ampinsk commented on Jan 14, 2019

    @ampinsk
    Contributor

    Since we've been considering this state the "manual" mode, I'd lean towards letting people do more, even if they get errors. But agreed we should include guardrails, especially around merges. Going off of @tierninho's list, I think:

    Disable when the Merge Conflict banner is present:

    • Branch > Update from [default]
    • Branch > Merge into Current branch
    • Merge button in compare panel

    Do not disable when merge conflict banner is present:

    • Push & Pull (This one might seem iffy but I think I'd prefer for people to run into the error instead of disabling it)
    • Branch > New Branch (might be a snag with this one that I'm not seeing?)
    • Branch > Compare to Branch
    • GitHub Desktop > Preferences
    • Repository > Repository settings
    • Branch > Rename
    • Branch > Delete
    • Undo

    I feel pretty loosely about most of this so please feel free to push back!

  11. billygriffin commented on Jan 23, 2019

    @billygriffin
    Contributor

    Let's start with @ampinsk's suggestions above and go from there. cc: @outofambit as I know we discussed the scope on this one.

  12. added and removed
    investigation-needed
    on Feb 4, 2019
  13. self-assigned this
    on Feb 6, 2019
  14. outofambit commented on Feb 7, 2019

    @outofambit
    Contributor

    I've been digging into this more and I'd like to propose an alternate approach where we don't disable these buttons but we show an error popup when they're executed to clearly describe the situation. (Basically that merging is not possible until they finish or abort the conflicted merge already in progress.)

    I think this would be a better experience because it would provide more context to the user for the issue and its current state. Also, it would allow us to more easily catch all places you can initiate a merge from (one places missing from the above list is the branch dropdown).

    Thoughts?

  15. billygriffin commented on Feb 7, 2019

    @billygriffin
    Contributor

    I'd be happy with this approach @outofambit. It has the same downsides as the other approach (if we detect the state improperly, for example), but provides more feedback.

  16. modified the milestones: 1.6.2, 1.6.3 on Feb 11, 2019
  17. outofambit commented on Feb 20, 2019

    @outofambit
    Contributor

    Hi, we're going to drop this from current milestones until we have a clearer sense on how often this issue occurs for people. If anyone wants to dive into this to flesh out a design and/or implement a solution in the meantime, that would be welcomed!

  18. removed this from the 1.6.3 milestone on Feb 20, 2019
  19. removed their assignment
    on Feb 20, 2019
  20. added
    help wanted
    on Feb 20, 2019
  21. added
    not-planned
    on Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantednot-planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions