{"thread":{"id":"21459","subject":"git subtree issues","startedAt":"2009-11-03T03:56:28Z","lastAt":"2009-11-04T19:57:06Z","messageCount":3,"participants":["morgflast","Avery Pennarun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"126621","messageId":"26159961.post@talk.nabble.com","threadId":"21459","inReplyTo":null,"subject":"git subtree issues","fromName":"morgflast","fromEmail":"daniel@sibblingz.com","sentAt":"2009-11-03T03:56:28Z","receivedAt":"2009-11-03T03:56:28Z","isPatch":false,"sender":{"key":"daniel@sibblingz.com","avatar":null},"body":"\nSo, I went ahead and did this\n\n$ git remote add -f vw_extensions git@github.com:sibblingz/vw_extensions.git\n(1)\n$ git merge -s ours --no-commit vw_extensions/master (2)\n$ git read-tree --prefix=some/directory/vw_extensions -u\nvw_extensions/master (3)\n$ git commit -m \"Merge B project as our subdirectory\" \n\nAnd that all seems to work ok.\n\nThen, I went to another directory where i had vw_extensions cloned, and made\na change to the README file, and pushed it.\n\nI went back to my first project, and did this, to try to pull those changes:\n\ngit pull -s subtree vw_extensions master remote: Counting objects: 5, done.\nremote: Compressing objects: 100% (3/3), done.\nremote: Total 3 (delta 2), reused 0 (delta 0)\nUnpacking objects: 100% (3/3), done.\nFrom git@github.com:sibblingz/vw_extensions\n * branch            master     -> FETCH_HEAD\nAlready uptodate!\nMerge made by subtree.\n\nHowever, when I looked at the README file in the first project, the changes\nweren't there.  I was wondering if anyone might have any suggestions about\nwhat to do.\n\nThanks!\nDaniel\n\n-- \nView this message in context: http://old.nabble.com/git-subtree-issues-tp26159961p26159961.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"126653","messageId":"32541b130911030743i4dcd9e37q34ead6a4a9a9814c@mail.gmail.com","threadId":"21459","inReplyTo":"26159961.post@talk.nabble.com","subject":"Re: git subtree issues","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-11-03T15:43:37Z","receivedAt":"2009-11-03T15:43:37Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Mon, Nov 2, 2009 at 11:56 PM, morgflast <daniel@sibblingz.com> wrote:\n> git pull -s subtree vw_extensions master remote: Counting objects: 5, done.\n> remote: Compressing objects: 100% (3/3), done.\n> remote: Total 3 (delta 2), reused 0 (delta 0)\n> Unpacking objects: 100% (3/3), done.\n> From git@github.com:sibblingz/vw_extensions\n>  * branch            master     -> FETCH_HEAD\n> Already uptodate!\n> Merge made by subtree.\n>\n> However, when I looked at the README file in the first project, the changes\n> weren't there.  I was wondering if anyone might have any suggestions about\n> what to do.\n\nHmm, the output certainly wasn't very helpful :(\n\nUsually what \"already uptodate\" means is that the commit it merged\ndidn't actually cause any changes.  Is it possible there's another\nREADME file that already contained this change?\n\nThe other problem with subtree merge is that it tries to *guess* which\nsubtree you want to merge, which unfortunately fails almost as often\nas it succeeds.  If it guessed incorrectly, it might have thrown away\nall the directories except one that didn't change at all.  If this is\nthe problem, I don't have an easy fix; my git-subtree command (which\nmakes it a bit easier to do the things you're trying to do in your\nemail) suffers from this too.  Eventually I was thinking of giving in\nand making subtree merge properly configurable, but I haven't had\ntime.\n\nOr maybe this is a totally different problem.  What do you get from:\n\n  git diff --stat $(git merge-base HEAD^ FETCH_HEAD) FETCH_HEAD\n\n?\n\nAvery\n"},{"id":"126816","messageId":"32541b130911041157i5125cc41pdceaa39fa5ceba67@mail.gmail.com","threadId":"21459","inReplyTo":"bdccb6a00911031019y48f1d1aax9be7b49e3463595@mail.gmail.com","subject":"Re: git subtree issues","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-11-04T19:57:06Z","receivedAt":"2009-11-04T19:57:06Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Tue, Nov 3, 2009 at 1:19 PM, Daniel Jacobs <daniel@sibblingz.com> wrote:\n> Ok.. I ran the command as you suggested\n> git pull -s subtree vw_extensions master\n> remote: Counting objects: 5, done.\n> remote: Compressing objects: 100% (3/3), done.\n> remote: Total 3 (delta 2), reused 0 (delta 0)\n> Unpacking objects: 100% (3/3), done.\n> From git@github.com:sibblingz/vw_extensions\n>  * branch            master     -> FETCH_HEAD\n> Already uptodate!\n> Merge made by subtree.\n>\n> git diff --stat $(git merge-base HEAD^ FETCH_HEAD) FETCH_HEAD\n>  README |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> So, it knows there was a change.  However, when I go and vim that README\n> file, the change is not there.  Maybe this gives you some more information.\n\nThis is extremely fishy.  What if you re-run the pull without the \"-s\nsubtree\" at all?  git must be trying to merge those changes in\n*somewhere*...\n\n> As an aside, I saw your git subtree tool, and it looks great, but I did not\n> try to use it because I could not figure out how to install it.  You might\n> get a few more users if you include instructions for installation somewhere.\n>  :-)\n\nOops, good point.  Somehow I forgot that.  Fixed.\n\nThanks,\n\nAvery\n"}]}