]> source.dussan.org Git - jgit.git/commit
RecursiveMerger should not fail on content-merge conflicts of parents 62/30562/2
authorChristian Halstrick <christian.halstrick@sap.com>
Fri, 25 Jul 2014 06:41:38 +0000 (08:41 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Mon, 28 Jul 2014 12:52:07 +0000 (14:52 +0200)
commit3b031fe3dc8c4e0e06e648e281af93533740ec93
tree7bf7a46c217b1e1afcae50b903780d6a24fa5509
parent289b7c60a9e232f7b37829c5aad858c7c13286b7
RecursiveMerger should not fail on content-merge conflicts of parents

Previously when RecursiveMerger was trying to create a single virtual
common base for the merge it was failing when this lead to content-merge
conflicts. This is different from what native git is doing. When native
git's recursive merge algorithm creates a new common base it will merge
the multiple parents and simply take the merge result (potentially
including conflict markers) as common base. See my discussion with Shawn
here: http://www.spinics.net/lists/git/msg234959.html :

  > - How should workingtree, index (stage1,2,3) look like if during
that
  > merge of common ancestors a conflict occurs? Will I see in stage2
and
  > stage3 really see content of X1 and X2?

  Its done entirely in memory and never touches the working tree or
  index. When a conflict exists in the X1-X2 merge the conflict is
  preserved into the new virtual base.

There is still the possibility that the merge of parents lead to
conflicts. File/Folder conclicts, conflicts on filemodes. This commit
only fixes the situation for conflicts when merging content.

Bug: 438203
Change-Id: If45bc3d078b3d3de87b758e71d7379059d709603
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/RecursiveMergerTest.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java