{"thread":{"id":"24634","subject":"Suggestions on how to reorganize and split up a monolithic repository?","startedAt":"2010-08-04T19:08:23Z","lastAt":"2010-08-04T19:08:23Z","messageCount":1,"participants":["Michael \"Ray\" Rehbein"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147127","messageId":"AANLkTikFrj6tyHfmZ8k-gmR+gAFyEGv+X+0x849eEaEP@mail.gmail.com","threadId":"24634","inReplyTo":null,"subject":"Suggestions on how to reorganize and split up a monolithic repository?","fromName":"Michael \"Ray\" Rehbein","fromEmail":"mrrehbein@gmail.com","sentAt":"2010-08-04T19:08:23Z","receivedAt":"2010-08-04T19:08:23Z","isPatch":false,"sender":{"key":"mrrehbein@gmail.com","avatar":null},"body":"Currently we have everything in one repository for our website, and\nare looking into splitting it up. The scale of one repository looks\nlike it will be getting out of hand down the road.\n\nGeneral layout at the moment:\n\nrepos.git/Site1\nrepos.git/Site2\nrepos.git/Library/Ours\nrepos.git/Library/3rdParty1\nrepos.git/Library/3rdParty2\nrepos.git/UnitTests/Ours\nrepos.git/UnitTests/3rdParty1\nrepos.git/UnitTests/3rdParty2\n\nGoals in splitting it up:\n- Allow each site to have a collection of libraries that are known to\nbe working for it.  Sometimes an update to shared library to fix site1\nwill break site2.\n- Allow a site to have only the needed libraries, to avoid bloating\nthe site, and help in identifying unused code.\n\nOne plan we started to go with was:\n\nSite1.git/\nSite1.git/Library/Ours - submodule link to OurLib.git/Library/Ours\nSite1.git/Library/3rdParty1 - submodule link to\n3rdParty1Lib.git/Library/3rdParty1\n\nOurLib.git/Library/Ours\nOurLib.git/UnitTests/Ours\nOurLib.git/Library/3rdParty1 - submodule link to\n3rdParty1Lib.git/Library/3rdParty1\n\n3rdParty1Lib.git/Library/3rdParty1\n3rdParty1Lib.git/UnitTests/3rdParty1\n\nBut found out that git submodule doesn't actually allow mapping a\nsection of a git repository, so changed it to:\n\nSite1.git/\nSite1.git/Library/Ours - symlink to submodule/OurLib/Library/Ours\nSite1.git/Library/3rdParty1 - symlink to\nsubmodule/3rdParty1Lib/Library/3rdParty1\nSite1.git/submodule/OurLib - submodule OurLib.git\nSite1.git/submodule/3rdParty1Lib - submodule 3rdParty1Lib.git\n\nOurLib.git/Library/Ours\nOurLib.git/UnitTests/Ours\nOurLib.git/Library/3rdParty1 - symlink to\nsubmodule/3rdParty1Lib/Library/3rdParty1\nOurLib.git/submodule/3rdParty1Lib - submodule 3rdParty1Lib.git\n\n3rdParty1Lib.git/Library/3rdParty1\n3rdParty1Lib.git/UnitTests/3rdParty1\n\nThe 3rd Party Lib is not all 3rd party anymore, as we have tweaked it\nto fit better in our setup.  Additionally, the 3rd party library\ndidn't come with unit tests.  One of the unit tests we wrote for our\nuse of the 3rd party ended up with a use of our library.  Putting a\nsubmodule of OurLib into 3rdParty1Lib would create recursive\nsubmodules, which is not something we want.\n\nIs there a better way to organize this?\n"}]}