{"thread":{"id":"25706","subject":"git remote vs. submodules","startedAt":"2010-11-11T01:45:22Z","lastAt":"2010-11-11T15:11:39Z","messageCount":5,"participants":["Patrick Doyle","Tomas Carnecky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155642","messageId":"AANLkTinev0W7-mm9wXmnZwY6DxN0Y2X0hJdpBOgM_4q=@mail.gmail.com","threadId":"25706","inReplyTo":null,"subject":"git remote vs. submodules","fromName":"Patrick Doyle","fromEmail":"wpdster@gmail.com","sentAt":"2010-11-11T01:45:22Z","receivedAt":"2010-11-11T01:45:22Z","isPatch":false,"sender":{"key":"wpdster@gmail.com","avatar":null},"body":"Hello All,\nI was just reading about git remote and I started thinking to myself,\n\"Gee, nothing I've read says that the remotes have to share a common\nancestor.  I wonder what would happen if I added two independent\nrepositories as remotes to a superproject?\"\n\nSo I tried it in a very trivial case.  The first thing I learned was\nthat I need to make the subprojects subdirectories of a top level\n.git-housing directory.  Or else, when I merge them in, everything in\nthe top level of subproject1 gets mixed in with everything in the top\nlevel of subproject2.  So this doesn't seem to be a good solution for\nmarrying arbitrary subprojects together.  But if I set up a library of\nsubprojects properly, it seems like I could do this.\n\nSo now I'm wondering... has anybody else ever had thoughts along these\nlines?  Has anybody tried this?  Has anybody seen it work (or fail\nmiserably)?\n\nWhy would I want to do this instead of using submodules?  I dunno.  It\njust came to mind when I started trying to understand what's really\ngoing on with remotes.  And I vaguely (and perhaps even correctly)\nrecall there being some controversy regarding submodules when they\nwere first introduced.\n\nAnyway, I figured It wouldn't hurt to ask folks in the know.\n\n--wpd\n"},{"id":"155665","messageId":"4CDBD4D4.1080607@dbservice.com","threadId":"25706","inReplyTo":"AANLkTinev0W7-mm9wXmnZwY6DxN0Y2X0hJdpBOgM_4q=@mail.gmail.com","subject":"Re: git remote vs. submodules","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2010-11-11T11:34:44Z","receivedAt":"2010-11-11T11:34:44Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 11/11/10 2:45 AM, Patrick Doyle wrote:\n> Hello All,\n> I was just reading about git remote and I started thinking to myself,\n> \"Gee, nothing I've read says that the remotes have to share a common\n> ancestor.  I wonder what would happen if I added two independent\n> repositories as remotes to a superproject?\"\n> \n> So I tried it in a very trivial case.  The first thing I learned was\n> that I need to make the subprojects subdirectories of a top level\n> .git-housing directory.  Or else, when I merge them in, everything in\n> the top level of subproject1 gets mixed in with everything in the top\n> level of subproject2.  So this doesn't seem to be a good solution for\n> marrying arbitrary subprojects together.  But if I set up a library of\n> subprojects properly, it seems like I could do this.\n> \n> So now I'm wondering... has anybody else ever had thoughts along these\n> lines?  Has anybody tried this?  Has anybody seen it work (or fail\n> miserably)?\n> \n> Why would I want to do this instead of using submodules?  I dunno.  It\n> just came to mind when I started trying to understand what's really\n> going on with remotes.  And I vaguely (and perhaps even correctly)\n> recall there being some controversy regarding submodules when they\n> were first introduced.\n\nAre you maybe looking for a subtree merge?\nhttp://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html\n\ntom\n"},{"id":"155700","messageId":"AANLkTin=t7RoLTwxc1KOv7_vZi-OgD_Jcu+66-fte6Sq@mail.gmail.com","threadId":"25706","inReplyTo":"4CDBD4D4.1080607@dbservice.com","subject":"Re: git remote vs. submodules","fromName":"Patrick Doyle","fromEmail":"wpdster@gmail.com","sentAt":"2010-11-11T14:44:08Z","receivedAt":"2010-11-11T14:44:08Z","isPatch":false,"sender":{"key":"wpdster@gmail.com","avatar":null},"body":"On Thu, Nov 11, 2010 at 6:34 AM, Tomas Carnecky <tom@dbservice.com> wrote:\n> Are you maybe looking for a subtree merge?\n> http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html\n\nYeah, that looks like it.  I never would have hit upon the read-tree\nstep by myself -- I would have just laid things out with the prefix\nalready embedded in the subprojects.\n\nHmmm... it seems to me that feeding changes back to the subprojects\nmight be difficult (and that is born out by a comment at the end of\nthe page you referenced.)\n\nHow much do folks use this approach?\n\n--wpd\n"},{"id":"155701","messageId":"4CDC04F7.6080801@dbservice.com","threadId":"25706","inReplyTo":"AANLkTin=t7RoLTwxc1KOv7_vZi-OgD_Jcu+66-fte6Sq@mail.gmail.com","subject":"Re: git remote vs. submodules","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2010-11-11T15:00:07Z","receivedAt":"2010-11-11T15:00:07Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 11/11/10 3:44 PM, Patrick Doyle wrote:\n> On Thu, Nov 11, 2010 at 6:34 AM, Tomas Carnecky <tom@dbservice.com> wrote:\n>> Are you maybe looking for a subtree merge?\n>> http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html\n> \n> Yeah, that looks like it.  I never would have hit upon the read-tree\n> step by myself -- I would have just laid things out with the prefix\n> already embedded in the subprojects.\n> \n> Hmmm... it seems to me that feeding changes back to the subprojects\n> might be difficult (and that is born out by a comment at the end of\n> the page you referenced.)\n\nhttps://github.com/apenwarr/git-subtree, it makes exactly that easier.\n\ntom\n"},{"id":"155702","messageId":"AANLkTi=wT4aVfaw3ZSyqPgforOc3fBSLCP8CQMboFOva@mail.gmail.com","threadId":"25706","inReplyTo":"4CDC04F7.6080801@dbservice.com","subject":"Re: git remote vs. submodules","fromName":"Patrick Doyle","fromEmail":"wpdster@gmail.com","sentAt":"2010-11-11T15:11:39Z","receivedAt":"2010-11-11T15:11:39Z","isPatch":false,"sender":{"key":"wpdster@gmail.com","avatar":null},"body":"On Thu, Nov 11, 2010 at 10:00 AM, Tomas Carnecky <tom@dbservice.com> wrote:\n> On 11/11/10 3:44 PM, Patrick Doyle wrote:\n>> On Thu, Nov 11, 2010 at 6:34 AM, Tomas Carnecky <tom@dbservice.com> wrote:\n>>> Are you maybe looking for a subtree merge?\n>>> http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html\n>>\n>> Yeah, that looks like it.  I never would have hit upon the read-tree\n>> step by myself -- I would have just laid things out with the prefix\n>> already embedded in the subprojects.\n>>\n>> Hmmm... it seems to me that feeding changes back to the subprojects\n>> might be difficult (and that is born out by a comment at the end of\n>> the page you referenced.)\n>\n> https://github.com/apenwarr/git-subtree, it makes exactly that easier.\n\nThat looks cool too!  Thanks.\n\n--wpd\n"}]}