git merge a b when a == b but neither == o is always a successful merge?
- From
- Daniel Hagerty <hag@linnaean.org>
- Date
- Nov 17, 2014, 18:39 UTC
- Message-ID
- <21610.16623.746985.383838@perdition.linnaean.org>
Given a repository setup thusly:
$ git --version git version 2.2.0.rc2
git init .
echo '0.0' > version git add version git commit -m "master" for i in a b ; do git checkout -b $i master
echo '0.1' > version git commit -a -m "leg $i" done
git checkout -b c master echo '0.2' > version git commit -a -m "leg c"
git checkout --detach a
"git merge c" produces the expected edit conflict.
"git merge b" produces a successful merge, as both branches perform the "same" work.
For the body of content in question, this is a merge conflict. Git seems to have the hard-coded assumption otherwise. I had to change three source files to get the result I expected, and wasn't seeing any indications of parameterization.
Am I missing some means of getting the results I need? Thanks!