Allow resolving merge conflicts where one side deleted the file
If I try to merge branches a
and b
, and branch a
edited file foo
while branch b
deleted it, we don't allow resolving the conflicts in the UI. We could, we just need to figure out a way to display this.
Here's an example of what the CLI does:
$ git merge conflict-start
CONFLICT (modify/delete): files/ruby/version_info.rb deleted in conflict-start and modified in HEAD. Version HEAD of files/ruby/version_info.rb left in tree.
Automatic merge failed; fix conflicts and then commit the result.
$ git status
On branch conflict-missing-side
You have unmerged paths.
(fix conflicts and run "git commit")
Changes to be committed:
modified: CHANGELOG
modified: files/images/logo-white.png
modified: files/markdown/ruby-style-guide.md
modified: files/ruby/popen.rb
modified: files/ruby/regex.rb
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by them: files/ruby/version_info.rb
In this example, files/ruby/version_info.rb
has the content from the branch which edited it, but isn't in the index because the other side of the merge deleted it.