Subject: Re: How to install and use a custom merge driver

From: Alec Clews <[email-masked]>
Date: Thu, 29 Jan 2009 18:00:51 +1100

Jeff King wrote:
> On Thu, Jan 29, 2009 at 04:47:19AM +0000, Alec Clews wrote:
>
>   
> What git version are you using? Can you post a shell snippet that breaks
> reliably?
>   

I used 1.5.6.3 on Ubuntu and 1.6.1.1 on Cygwin.

The problem appears to be spaces around '=' in the attributes file. This 
fails for me

----------8<----------------------------------
commit() {
 echo $1 >file && git add file && git commit -m $1
}

rm -rf repo

mkdir repo && cd repo && git init
commit base
commit branch-master
git checkout -b other HEAD^
commit branch-other

echo '* merge = overwrite' >.git/info/attributes
cat >>.git/config <<'EOF'
[merge "overwrite"]
 name = overwrite using cp
 driver= cp %B %A
EOF

git merge master
----------8<---------------------------------

-- 
Alec Clews
Personal <[email-masked]>			Melbourne, Australia.
Jabber:  [email-masked]		PGPKey ID: 0x9BBBFC7C
Blog  http://alecthegeek.wordpress.com/