Subject: Re: Choosing a mergetool according to file type

From: Gregory Jefferis <[email-masked]>
Date: Fri, 26 Jun 2009 18:03:44 +0100

Hi Matthieu,

On 2009-06-26 14:51, "Matthieu Moy" <[email-masked]> wrote:

> Gregory Jefferis <[email-masked]> writes:
> 
>> This defines the merge driver but not the mergetool.  A mergetool is
>> presumably an interactive tool that helps you clean up failed automatic
>> merges.
> 
> This is why I quoted the title of the section
> 
>>>        Defining a custom merge driver
> 
> Just tried it with
> 
> [merge "filfre"]
>        name = feel-free merge driver
>        driver = gedit %O %A %B
>        recursive = binary
> 
> It did launch gedit interactively during the merge.

Hmm, I had of course looked at this but this thought that it wouldn't do
what I want. For one, I thought this would _always_ call gedit even if the
file is unchanged in remote. Testing, however this doesn't seem to be the
case. So I think you're right that this method can be used satisfactorily
even with an interactive merge and I have made a little script that seems to
do what I need.

On the other hand to me it does somewhat violate the separation between
automatic and interactive merging and one probably has to be quite careful
about what state the merge files are left in - presumably things that
whoever wrote the builtin "binary" merge thought about carefully.

All the best,

Greg.