{"thread":{"id":"39392","subject":"Issue when merging a subtree whose a file has been removed","startedAt":"2015-05-21T12:44:35Z","lastAt":"2015-05-21T12:44:35Z","messageCount":1,"participants":["adatoccpptranslator@free.fr"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"261773","messageId":"617623154.419127148.1432212275021.JavaMail.root@zimbra41-e7.priv.proxad.net","threadId":"39392","inReplyTo":"1663657179.419121722.1432212216042.JavaMail.root@zimbra41-e7.priv.proxad.net","subject":"Issue when merging a subtree whose a file has been removed","fromName":"","fromEmail":"adatoccpptranslator@free.fr","sentAt":"2015-05-21T12:44:35Z","receivedAt":"2015-05-21T12:44:35Z","isPatch":false,"sender":{"key":"adatoccpptranslator@free.fr","avatar":null},"body":"Hi all,\n\n \n\nI want to use subtrees in one of my projects and I use method desribed here https://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging\nI`m facing issues when merging subtree in my subproject in case some files have been removed from the subtree.\n\nI`m running git 1.9.1 on Kubuntu  14.04\nsub_project is integrated as subtree in my main project. I modify a file and remove an other file from my sub_project, commit the modification, go in my main_project, checkout the sub_project integration branch, pull the modification.\nI see the modification of the modified file and the deletion of the removed file \nI checkout the master branch of my main project.\ngit diff-tree -p sub_project_branch indicate that one file has been modified and one files has been deleted\nthen I perform a merge of my subtree integration branch into master branch.\n\nI was expecting to see the in master the modification of the file and the deletion of the other file but the removed file is still there and tracked. The modification of file has been done but It looks like the deletion has not been \"merged\".\nThe test case can be reproduced using run_subtree.sh attached script \n\nThe behaviour I expect is the same that the one illustrated in run.sh which perform exactly the same actions excepted they are done in a branch instead of a subtree:\ntoto should have been modified, tata should no more be there or at least no more be tracked\n\nAccording to what I see it seems that the subtree merge is doing a kind of copy instead of a real merge meaning that if source file disappear then the corresponding target file is untouched instead of being deleted.\nIs this behaviour correct or is it my understanding of what subtree merge should do that is wrong ?\n\n\nThanks by advance\nJulien\n\nPS : as my subtree prefix has 2 levels I also test with a single level like in subtree tutorial to ensure this was not the cause of my issue but the problem remains the same. the single level test is performed by run_simple_subtree.sh"}]}