Subject: Re: bug with .gitattributes diff and embedded NUL

From: Eric Blake <[email-masked]>
Date: Wed, 19 Dec 2007 07:19:16 -0700

According to Junio C Hamano on 12/18/2007 11:40 PM:
> Eric Blake <[email-masked]> writes:
> 
>> Looking closer at .dotest/0001, the diff is indeed invalid, containing the
>> single line
> 
> That dataflow loses NUL.  Fixing
> rebase not to reuse the e-mailed patch dataflow is on my to-do list, but
> has been slipping.
> 
> I think you can use "rebase -m" to work this issue around.

Indeed, after learning about git-rebase -m and git-mergetool, adding the
merge option alongside the diff option for the file in question, and
teaching emacs that it should use emerge-diff-options "-a" so that it can
handle embedded NUL, I was finally able to use git-mergetool to do a sane
merge of the differences in the mostly-text file.  Thanks!

But it raised some additional issues:

Is there a way to specify custom merge tools, rather than the current
hard-coded list valid for merge.tool?  For example, what if I prefer
emacs' ediff driver over its emerge driver?

Using merge.tool of emerge leaves junk around when the merge is aborted.
Before I edited emacs' emerge-diff-options, the subsidiary diff3 was
failing because it treated the file to merge as binary even though git was
trying to treat it as text.  As a result, emerge left behind all of its
command-line argument files (file.{BASE,LOCAL,REMOTE}.pid), and git did
not clean any of them up.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email-masked]