# Strange merge output.

2 messages from 2014-01-30 to 2014-01-30. Participants: Vincent Bernardi, David Kastrup.
Thread: https://gitlist.dev/t/35766

## Vincent Bernardi, 2014-01-30 10:52

Subject: Strange merge output.
Message-ID: <55DE3FAC-BD7E-4AB2-8A18-CF85BB859465@kameleoon.com>
URL: https://gitlist.dev/e/55DE3FAC-BD7E-4AB2-8A18-CF85BB859465%40kameleoon.com

```
Hi,
I asked about this problem on #git@freenode and someone suggested I submit it to this list. I have a case where the output of a merge gives a conflict and produces the following file:

Code Block A
<<<<<<< HEAD
=======
Code Block B
>>>>>>> branch-B
Code Block B' (similar to code block B but not exactly the same).

Here is what HEAD looks like 
Code Block A
Code Block B' 

and branch-B:
Code Block A
Code Block B

I thought that taking a conflicted file like above and removing the three following lines:
<<<<<<< HEAD
=======
>>>>>>> branch-B

was supposed to produce *exactly* the branch-B version?

1°/ was I wrong to believe this implied promise?
2°/ if not, is this a known problem with git merge's default recursive strategy? (I didn't change any default configuration about merging).
3°/ If yes to question 2°/, is there a known workaround for it? I am trying to move my team to git, but we already have a hard time understanding how it works. I'm really hoping it's a case of us not understanding things and not a bug :-)

Thanks in advance for any answer, I'm willing to answer any question to help create a test case for this.

Vincent Bernardi

P.S.: I am using git 1.8.3.4
-----
The Kameleoon team.
http://www.kameleoon.com
```

## David Kastrup, 2014-01-30 11:24

Subject: Re: Strange merge output.
Message-ID: <87y51x4sr4.fsf@fencepost.gnu.org>
URL: https://gitlist.dev/e/87y51x4sr4.fsf%40fencepost.gnu.org
In-Reply-To: <55DE3FAC-BD7E-4AB2-8A18-CF85BB859465@kameleoon.com>

```
Vincent Bernardi <vincent@kameleoon.com> writes:

> Hi,
> I asked about this problem on #git@freenode and someone suggested I
> submit it to this list. I have a case where the output of a merge
> gives a conflict and produces the following file:
>
> Code Block A
> <<<<<<< HEAD
> =======
> Code Block B
>>>>>>>> branch-B
> Code Block B' (similar to code block B but not exactly the same).
>
> Here is what HEAD looks like 
> Code Block A
> Code Block B' 
>
> and branch-B:
> Code Block A
> Code Block B
>
> I thought that taking a conflicted file like above and removing the
> three following lines:
> <<<<<<< HEAD
> =======
>>>>>>>> branch-B
>
> was supposed to produce *exactly* the branch-B version?

No?  It will produce the branch-B version in the conflicted area, but
that does not mean that conflict resolution might not have been done
outside of that area.

-- 
David Kastrup

```
