From: adatoccpptranslator@free.fr
To: git@vger.kernel.org
Subject: Issue when merging a subtree whose a file has been removed
Date: Thu, 21 May 2015 14:44:35 +0200 (CEST) [thread overview]
Message-ID: <617623154.419127148.1432212275021.JavaMail.root@zimbra41-e7.priv.proxad.net> (raw)
In-Reply-To: <1663657179.419121722.1432212216042.JavaMail.root@zimbra41-e7.priv.proxad.net>
[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]
Hi all,
I 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
I`m facing issues when merging subtree in my subproject in case some files have been removed from the subtree.
I`m running git 1.9.1 on Kubuntu 14.04
sub_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.
I see the modification of the modified file and the deletion of the removed file
I checkout the master branch of my main project.
git diff-tree -p sub_project_branch indicate that one file has been modified and one files has been deleted
then I perform a merge of my subtree integration branch into master branch.
I 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".
The test case can be reproduced using run_subtree.sh attached script
The 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:
toto should have been modified, tata should no more be there or at least no more be tracked
According 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.
Is this behaviour correct or is it my understanding of what subtree merge should do that is wrong ?
Thanks by advance
Julien
PS : 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
[-- Attachment #2: run.sh --]
[-- Type: application/x-shellscript, Size: 763 bytes --]
[-- Attachment #3: run_subtree.sh --]
[-- Type: application/x-shellscript, Size: 1858 bytes --]
[-- Attachment #4: run_simple_subtree.sh --]
[-- Type: application/x-shellscript, Size: 1801 bytes --]
next parent reply other threads:[~2015-05-21 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1663657179.419121722.1432212216042.JavaMail.root@zimbra41-e7.priv.proxad.net>
2015-05-21 12:44 ` adatoccpptranslator [this message]
[not found] <2074448442.419140473.1432212498797.JavaMail.root@zimbra41-e7.priv.proxad.net>
2015-05-21 12:49 ` Issue when merging a subtree whose a file has been removed adatoccpptranslator
[not found] <160239201.419722978.1432221938533.JavaMail.root@zimbra41-e7.priv.proxad.net>
2015-05-21 15:40 ` adatoccpptranslator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=617623154.419127148.1432212275021.JavaMail.root@zimbra41-e7.priv.proxad.net \
--to=adatoccpptranslator@free.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).