]> git.proxmox.com Git - libgit2.git/commit - tests/merge/trees/recursive.c
merge: handle conflicts in recursive base building
authorEdward Thomson <ethomson@microsoft.com>
Fri, 20 Nov 2015 22:33:49 +0000 (17:33 -0500)
committerEdward Thomson <ethomson@microsoft.com>
Wed, 25 Nov 2015 20:38:39 +0000 (15:38 -0500)
commit78859c63442bb367a4d426ec8ee31c82a28a93d7
tree75a5bc0e2ccfd8d0dda419afdb906db3e866ee0a
parent34a51428a121800509c2bea94137a17802e37982
merge: handle conflicts in recursive base building

When building a recursive merge base, allow conflicts to occur.
Use the file (with conflict markers) as the common ancestor.

The user has already seen and dealt with this conflict by virtue
of having a criss-cross merge.  If they resolved this conflict
identically in both branches, then there will be no conflict in the
result.  This is the best case scenario.

If they did not resolve the conflict identically in the two branches,
then we will generate a new conflict.  If the user is simply using
standard conflict output then the results will be fairly sensible.
But if the user is using a mergetool or using diff3 output, then the
common ancestor will be a conflict file (itself with diff3 output,
haha!).  This is quite terrible, but it matches git's behavior.
28 files changed:
src/merge.c
tests/merge/conflict_data.h
tests/merge/trees/recursive.c
tests/merge/workdir/recursive.c
tests/resources/merge-recursive/.gitted/objects/15/311229e70fa62653f73dde1d4deef1a8e47a11 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/37/185b25a204309bf74817da1a607518f13ca3ed [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/37/a5054a9f9b4628e3924c5cb8f2147c6e2a3efc [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/42/44d13e2bbc38510320443bbb003f3967d12436 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/4f/4e85a0ab8515e34302721fbcec06fa9d9c1a9a [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/56/07a8c4601a737daadd1f470bde3142aff57026 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/63/e8773becdea9c3699c95a5740be5baa8be8d69 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/6c/778edd0e4cf394f5a3df8b96db516024cc1bb8 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/6e/f31d35a3f5abc1e24f4f9afa5cb2016f03fa2d [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/7a/9277e0c5ec75339f011c176d0c20e513c4de1c [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/88/8588a782ad433fbf0cc526e07cfe6f4a6b60b3 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/98/1c79eb38518d3821e73bb159dc413bb42d6614 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/a0/2d4fd126e0cc8fb46ee48cf38bad36d44f2dbc [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/aa/9e263294fd2f6f6fd9ceab23ca8ce3ea2ce707 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/b9/1ef5ffa8612616c8e76051901caafd723f0e2c [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/ca/fa936d25f0b397432a27201f6b3284c47df8be [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/d6/04c75019c282144bdbbf3fd3462ba74b240efc [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/db/203155a789fb749aa3c14e93eea2c744a9c6c7 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/e1/512550f09d980214e46e6d3f5a2b20c3d75755 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/objects/f7/929c5a67a4bdc98247fb4b5098675723932a64 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/refs/heads/branchH-1 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/refs/heads/branchH-2 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/refs/heads/branchI-1 [new file with mode: 0644]
tests/resources/merge-recursive/.gitted/refs/heads/branchI-2 [new file with mode: 0644]