Subject: Re: [PATCH v2] git-merge: ignore space support

From: Justin Frankel <[email-masked]>
Date: Wed, 25 Aug 2010 08:51:25 -0700

Bert Wesarg wrote:
> Hi,
>
> On Wed, Aug 25, 2010 at 06:40, Jonathan Nieder <[email-masked]> wrote:
>   
>> Justin Frankel wrote:
>>
>>     
>>> Fine by me... (ok if I were to nitpick I would probably make most of
>>> the internal static functions check that opts was non-NULL before
>>> dereferencing, in case the calling code ever changed
>>>       
>> Not a bad idea.  I'll squash in something like this.
>>
>> A real BUG_ON macro would make this less ugly.
>>     
>
> I think exactly because of this there is no prior art of using NULL as
> 'use the default options'. Without this all these NULL pointer checks
> wont be necessary.
>   

The only danger is that ll_merge()'s signature didn't change in such a 
way to break compilation, i.e:

int ll_merge(mmbuffer_t *result_buf,
             const char *path,
             mmfile_t *ancestor, const char *ancestor_label,
             mmfile_t *ours, const char *our_label,
             mmfile_t *theirs, const char *their_label,
             int flag);

becomes:

int ll_merge(mmbuffer_t *result_buf,
             const char *path,
             mmfile_t *ancestor, const char *ancestor_label,
             mmfile_t *ours, const char *our_label,
             mmfile_t *theirs, const char *their_label,
             struct whatever *conf);

In this case, passing 0 as the last parameter will compile either way.

Sure, we can grep all of the source, but who knows when something else 
will get merged in...

-Justin