git merge no longer handles add/add

2 messages, 1 author, 2016-06-15 · open the first message on its own page

git merge no longer handles add/add

From: Martin Langhoff <hidden>
Date: 2016-06-15 22:43:52

git used to be really good at merging 2 branches that had gotten the
same code added independently. Right now, both master
(1.5.3.5.737.gdee1b)
and next (9445b41) are telling me that the exact same file (same
sha1), with the same mode added on 2 branches is a merge conflict. On
_one_ of the branches there is an extra commit.

Hmmm.

I am pretty sure that early git (pre 1.0) could handle this correctly.
I remember sending git-archimport to Junio and immediately doing 3 or
4 commits on top, and having the next pull work correctly without
conflict because the merge machinery spotted the "last common sha1"
for that file and saw that only one side had changed since then.

Happens with recursive and resolve. Happy to provide a minimal repro
case, but I think this is fairly obvious...

cheers,



martin

Re: git merge no longer handles add/add

From: Martin Langhoff <hidden>
Date: 2016-06-15 22:43:52

On Nov 19, 2007 4:18 PM, Martin Langhoff [off-list ref] wrote:
Happens with recursive and resolve. Happy to provide a minimal repro
case, but I think this is fairly obvious...
Steps to repro...

    mkdir repro
    cd repro/
    cp /etc/resolv.conf ./resolv.conf
    git init
    git add resolv.conf
    git commit -m 'a' resolv.conf
    cp resolv.conf resolv-1.conf
    git add resolv-1.conf
    git commit -m 'a1' resolv-1.conf
    echo blabla >> resolv-1.conf
    git commit -m 'a2' resolv-1.conf
    git-branch other HEAD^^
    git checkout other
    cp resolv.conf resolv-1.conf
    git add resolv-1.conf
    git commit -m 'b'
    git checkout master
    git merge other
    ...
   Auto-merged resolv-1.conf
   CONFLICT (add/add): Merge conflict in resolv-1.conf
   Automatic merge failed; fix conflicts and then commit the result.




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