Thread (9 messages) flat view 9 messages, 3 authors, 2016-06-15

Re: How to install and use a custom merge driver

From: Jeff King <hidden>
Date: 2016-06-15 22:46:03

On Wed, Jan 28, 2009 at 11:04:02PM +0000, Alec Clews wrote:
I fixed that problem -- however it did not make any difference.
Can you post an exact recipe for recreating the problem? It works just
fine here, using:

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

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< --

I get an automatic merge with the contents from "master" (and without
the merge config, there is obviously a conflict).
Is there someway to enable logging to see how git is making this choice?
You can try "git check-attr merge file" to be sure that it is picking up
the attribute.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help