I am merging code from one release to another.  It has some medium level 
conflicts.  I would be able to sit and resolve them if I could get the 
merge tools to work correctly.  When I run a mergetool like p4merge, 
instead of seeing the BASE file as the contents of the file before either 
changes were made I instead get an annotated file.  This file has the base 
state plus merge conflict annotations around the conflicting regions.  This 
destroys any chance of the mergetool being able to present a sensible 
merge.  I would have to do all the work by hand.  

An example is with a pom.xml file that I am merging.  The path to the 
parent pom was changed on one side.  The version of the pom was changed on 
the other.  This should be a trivial conflict to resolve.  In this case the 
file in questions is /build-tools/pom.xml.  I would expect and I do find 
merge annotations in this file:

grep -E '(^==)|(^>>)|(^<<)' pom.xml
>
> <<<<<<< HEAD
>
> =======
>
> >>>>>>> ToBisque
>
>
I would not expect to find merge annotations in the base file, but I do:

> grep -E '(^==)|(^>>)|(^<<)' pom.xml.BASE.9944.xml

<<<<<<< Temporary merge branch 1

=======

>>>>>>> Temporary merge branch 2

 
Now I thought, maybe I made a mistake earlier and committed merge 
annotations and later removed them.  So I took a look at the actual merge 
base file:

> git merge-base HEAD ToBisque
>
> 4abad03f105d8bd470ef602ad74d5f03123bc3ad
>
>
 

git show 4abad03f105d8bd470ef602ad74d5f03123bc3ad:pom.xml | grep -E 
> '(^==)|(^>>)|(^<<)'


But there are no merge annotations in the file in the repo.

Why am I getting merge annotations in my BASE file, who do I remove it so 
that my merge tools can provide me a clean diff between LOCAL, REMOTE, and 
BASE.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to