Skip to content

acknowledge and handle binary files with conflicts differently in the UI - #6082

Closed
shiftkey wants to merge 10 commits into
masterfrom
ui-to-ignore-binary-conflicts
Closed

shiftkey wants to merge 10 commits into
masterfrom
ui-to-ignore-binary-conflicts

Conversation

@shiftkey

@shiftkey shiftkey commented Nov 2, 2018 •

Copy link
Copy Markdown
Member

Overview

Closes #6066

This PR adds a simple UI to acknowledge binary files with conflicts, rather than considering them resolved.

Description

  • test that binary files are marked as conflicted
  • retest with detect conflicted merges from elsewhere and show flow #6067 merged so we can confirm the dialog isn't closed after resolving on command line
  • merge conflict detection needs to look for .git/MERGE_HEAD rather than working directory state
  • investigate how changes have introduced the "list of files loaded after showing popup, leading to the popup being drawn off center" issue again
  • ensure the UI does show a "all conflicts resolved" if there is nothing left to do
  • investigate why counted file does not show an entry in list

More information

Collapsed away to focus on the feature itself, expand me

There's some imperfections with the flow currently that I'm thinking about, and might be resolved with other work that's in-progress.

I have two options here based on the command line - "ours" or "theirs":

On branch make-a-change
You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)

	deleted by us:   my-cool-image.png
  1. If I run git add my-cool-image.png in the shell to add the file ("theirs"), this is what Git reports.
On branch make-a-change
All conflicts fixed but you are still merging.
  (use "git commit" to conclude merge)

Changes to be committed:

	new file:   my-cool-image.png

When I switch back to the app, the conflict dialog disappears and it looks like I'm about to make a regular commit.

This should be fixed when #6067 is resolved, and I imagine the app would show an empty list of conflicts and let the user commit the merge.

  1. If I run git rm my-cool-image.png in the shell to remove the file ("ours"), this is what Git reports:
On branch make-a-change
All conflicts fixed but you are still merging.
  (use "git commit" to conclude merge)

And when I switch to the app, I don't have the ability to commit to complete the merge (because no changes):

Again, when we resolve #6067 the app should put them back in the conflicts UI and get them to complete the merge, but we don't necessarily have any conflicts to display as resolved.

@ampinsk did any of your mocks around the conflicts dialog have a "no outstanding conflicts" view? I think users who resolve conflicts externally and stage the changes from the command line will lose context like this, and it'd be nice to just have a "you're good to merge" state for the dialog.

Release notes

Notes: no-notes

@ampinsk

ampinsk commented Nov 2, 2018

Copy link
Copy Markdown
Contributor

@shiftkey so it wouldn't be possible to show the original list of conflicts with them all resolved? Something like:

screen shot 2018-11-02 at 12 02 12 pm

If we have no files to show then I think we can do something like this:

screen shot 2018-11-02 at 12 02 25 pm

@shiftkey

shiftkey commented Nov 3, 2018

Copy link
Copy Markdown
Member Author

so it wouldn't be possible to show the original list of conflicts with them all resolved?

@ampinsk not without more work in the app. We can check text conflicts are resolved by looking for conflict markers in the contents, but binary files have no equivalent - and updating the index (which is what git rm or git add does) causes the conflicted markers in the index to disappear (so they just look like plain files).

@billygriffin

Copy link
Copy Markdown
Contributor

@shiftkey Does @ampinsk's proposed "All conflicts resolved" UI with the check mark work for this case of coming back to the app and being able to complete the merge? Seems reasonable to me and in line with what I heard from you as well.

@shiftkey

shiftkey commented Nov 6, 2018

Copy link
Copy Markdown
Member Author

@billygriffin yeah, I think I'm fine with that if we detect you're in a merge conflict but don't have anything to show (because it's been resolved).

@billygriffin

Copy link
Copy Markdown
Contributor

Seems like a reasonable first step then, thanks!

@shiftkey
shiftkey force-pushed the ui-to-ignore-binary-conflicts branch from d867eca to b43512b Compare November 6, 2018 17:25
@shiftkey shiftkey added this to the 1.5.0 milestone Nov 6, 2018
@shiftkey
shiftkey force-pushed the ui-to-ignore-binary-conflicts branch from b43512b to dee6000 Compare November 6, 2018 18:29
@shiftkey
shiftkey force-pushed the ui-to-ignore-binary-conflicts branch 2 times, most recently from 00eed01 to f9509e7 Compare November 6, 2018 23:27
@shiftkey
shiftkey force-pushed the ui-to-ignore-binary-conflicts branch from f9509e7 to ec0d381 Compare November 6, 2018 23:31
Comment thread app/src/lib/git/status.ts
currentUpstreamBranch,
branchAheadBehind,
exists: true,
mergeHeadFound,

This comment was marked as spam.

This comment was marked as spam.

@shiftkey

shiftkey commented Nov 7, 2018

Copy link
Copy Markdown
Member Author

Closing this out for now because #6116 is a more urgent PR to land. Once that's in, I'll reopen a fresh PR with the remaining changes to support this UI.

@shiftkey shiftkey closed this Nov 7, 2018
@shiftkey
shiftkey deleted the ui-to-ignore-binary-conflicts branch November 7, 2018 13:44
@shiftkey

shiftkey commented Nov 7, 2018

Copy link
Copy Markdown
Member Author

#6122 is the evolution of this PR, ready for testing while we co-ordinate landing other PRs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants