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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bert Wesarg wrote:
Hi,

On Wed, Aug 25, 2010 at 06:40, Jonathan Nieder <jrnieder@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]