git merge -s subtree seems to be broken.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At work, we recently updated from a massively old version of git (1.7.10) to 2.18. There are a few code bases that use subtrees, and they seem to have completely broke when trying to merge in updates.

I have confirmed that it works correctly in 1.7.10.  The 2.18 behavior is clearly incorrect.

git init
echo init > test
git add test
git commit -m init

git remote add tig https://github.com/jonas/tig.git
git fetch tig
git merge -s ours --no-commit --allow-unrelated-histories tig-2.3.0
git read-tree --prefix=src/ -u tig-2.3.0
git commit -m "Get upstream tig-2.3.0"
# Notice how the history are merged, and that the source from the upstream repo is in src

echo update > test
git commit -a -m "test"

git merge -s subtree tig-2.4.0
# Boom, in 2.18 instead of merging into the subtree, it just deletes everything in the repository, which is clearly the wrong behavior.

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux