Subject: Re: Merge-Recursive Improvements

From: Stefan Monnier <[email-masked]>
Date: Tue, 12 Feb 2008 18:03:00 -0500

> "ORIG_HEAD...MERGE_HEAD" diffs to see what was going on. I could use an
> external diff tool (yuck), but I would like to modify the conflict markers
> to resemble those of Perforce:

>>>>>>>> merge-base:file.txt
>   Original code.
>   ======= HEAD:file.txt
>   Head code.
>   ======= merge:file.txt
>   Merged code.
>   <<<<<<<

Having such 3-parts conflicts helps tremendously when you have to do
the merge by hand, so I'm 100% in favor of such a change.

BUT Please, please, pretty please, don't follow Perforce who blindly
disregards previous standards.  Instead use the format used by diff3
which has been there for ages:

   <<<<<<< foo
   original text
   ||||||| bar
   ancestor
   =======
   new text
   >>>>>>> baz

> Third, git doesn't appear to have any sense of context when performing a
> merge. Another contrived example which wouldn't be flagged as a merge
> conflict:

>   ptr = malloc(len); // Added in HEAD.
>   init();            // Included in merge-base.
>   ptr = malloc(len); // Added in "merge".

Yes, that's nasty.

> Fourth, git doesn't provide a mechanism for merges to ignore whitespace
> changes.

I can live with that.  As long as the conflict is clearly marked with
all 3 parts, I can use any external tool I want to resolve the conflict.

        Stefan