git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git merge -s subtree seems to be broken.
@ 2018-07-31 14:09 George Shammas
  2018-07-31 15:03 ` George Shammas
  0 siblings, 1 reply; 17+ messages in thread
From: George Shammas @ 2018-07-31 14:09 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1212 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-08-02 18:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31 14:09 git merge -s subtree seems to be broken George Shammas
2018-07-31 15:03 ` George Shammas
2018-07-31 15:50   ` Jeff King
2018-07-31 16:08     ` Junio C Hamano
2018-08-01  0:58     ` René Scharfe
2018-07-31 15:53   ` Junio C Hamano
2018-07-31 15:56     ` George Shammas
2018-07-31 16:15     ` Jeff King
2018-07-31 17:17       ` Junio C Hamano
2018-07-31 17:23         ` Jeff King
2018-07-31 19:04           ` Jeff King
2018-07-31 19:52             ` George Shammas
2018-07-31 20:40               ` Jeff King
2018-07-31 21:06             ` Junio C Hamano
2018-08-01  0:58               ` René Scharfe
2018-08-02 18:58                 ` Jeff King
2018-08-02 18:45               ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).