{"thread":{"id":"27173","subject":"Submodules or separate repos?","startedAt":"2011-04-25T10:35:10Z","lastAt":"2011-04-25T19:57:57Z","messageCount":2,"participants":["Michael Treibton","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"166307","messageId":"BANLkTinAC2Thuf_z_-DMEHotgF-tqpQYZw@mail.gmail.com","threadId":"27173","inReplyTo":null,"subject":"Submodules or separate repos?","fromName":"Michael Treibton","fromEmail":"mtreibton@googlemail.com","sentAt":"2011-04-25T10:35:10Z","receivedAt":"2011-04-25T10:35:10Z","isPatch":false,"sender":{"key":"mtreibton@googlemail.com","avatar":null},"body":"hi,\n\nplease CC me as i am not subscribed\n\nive recently converted a project that was in svn to use git - and\nthat's gone well.\n\nin doing this ive been wondering if i can't split up the respository\nmore.  currently we have this:\n\nproject/\n    core/\n    modules/\n        moduleA/\n        moduleB/\n\nWhich i think is fairly typical of most projects.\n\ni was wondering how feasible it would be to split out \"moduleA\" and\n\"moduleB\" into their own repositories? to me that makes sense.  but by\nthemselves neither \"moduleA\" or \"moduleB\" would compile without the\ncore.\n\nSo...\n\ndoes this make more sense for submodules or separate repositories?\n\nAnd if they were separate repositories, how would this work from a\ndevelopment point of view?  what about a release of the project? would\nthere be a makefile which pulled in a known version of tarball\nreleased from each moduleX repository?\n\nWhat do most other people do in this situation?\n\nTIA!\n\nMichael\n"},{"id":"166326","messageId":"4DB5D245.6030800@web.de","threadId":"27173","inReplyTo":"BANLkTinAC2Thuf_z_-DMEHotgF-tqpQYZw@mail.gmail.com","subject":"Re: Submodules or separate repos?","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2011-04-25T19:57:57Z","receivedAt":"2011-04-25T19:57:57Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 25.04.2011 12:35, schrieb Michael Treibton:\n> ive recently converted a project that was in svn to use git - and\n> that's gone well.\n> \n> in doing this ive been wondering if i can't split up the respository\n> more.  currently we have this:\n> \n> project/\n>     core/\n>     modules/\n>         moduleA/\n>         moduleB/\n> \n> Which i think is fairly typical of most projects.\n> \n> i was wondering how feasible it would be to split out \"moduleA\" and\n> \"moduleB\" into their own repositories? to me that makes sense.\n\nIn my experience that only makes sense when one of the following\nconditions is met for \"moduleA\" and \"moduleB\":\n\n* they are developed by someone else\n\n* they contain code shared between superprojects\n\n* they consist of huge and/or many files that would hurt performance\n  of everyday git commands.\n\n(See https://git.wiki.kernel.org/index.php/SubprojectSupport for a\nmore complete discussion of submodules and other subproject\ntechniques)\n\nI can't see that splitting up the repository just because you can is\nbuying anything - except extra overhead for everyday development. So\nI think you have to have a good reason to do that (but you didn't\nmention any ;).\n\n> but by\n> themselves neither \"moduleA\" or \"moduleB\" would compile without the\n> core.\n\nThat rather looks like an argument against splitting them off. Even\nthough we have submodules depending on the presence of other\nsubmodules at my dayjob, they almost never depend on anything in\nthe superproject (the only exception being a file containing a\nproject version which is then to be used for all build artifacts,\nbut that is a convention used in all our superprojects).\n\n> And if they were separate repositories, how would this work from a\n> development point of view?  what about a release of the project? would\n> there be a makefile which pulled in a known version of tarball\n> released from each moduleX repository?\n\nThat depends on the technique you choose. But I really can't answer\nthat question until you share your motivation for having separate\nrepositories in the first place.\n"}]}