git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to install and use a custom merge driver

From
ACAlec Clews <alec.clews@gmail.com>
Date
Jan 29, 2009, 07:00 UTC
Message-ID
<49815423.8000902@gmail.com>
In-Reply-To
<20090129050348.GA31202@coredump.intra.peff.net>
Jeff King wrote:
Show 6 quoted lines
> 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 <alec.clews@gmail.com>			Melbourne, Australia.
Jabber:  alecclews@jabber.org.au		PGPKey ID: 0x9BBBFC7C
Blog  http://alecthegeek.wordpress.com/
Previous: Jeff KingNext: Jeff King
Message 8 of 9 in “How to install and use a custom merge driver”
  1. Alec ClewsJan 28, 2009
  2. Jeff KingJan 28, 2009
  3. Alec ClewsJan 28, 2009
  4. Alec ClewsJan 28, 2009
  5. Jeff KingJan 29, 2009
  6. Alec ClewsJan 29, 2009
  7. Jeff KingJan 29, 2009
  8. Alec ClewsJan 29, 2009
  9. Jeff KingJan 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.