Suggestions on how to reorganize and split up a monolithic repository?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently we have everything in one repository for our website, and
are looking into splitting it up. The scale of one repository looks
like it will be getting out of hand down the road.

General layout at the moment:

repos.git/Site1
repos.git/Site2
repos.git/Library/Ours
repos.git/Library/3rdParty1
repos.git/Library/3rdParty2
repos.git/UnitTests/Ours
repos.git/UnitTests/3rdParty1
repos.git/UnitTests/3rdParty2

Goals in splitting it up:
- Allow each site to have a collection of libraries that are known to
be working for it.  Sometimes an update to shared library to fix site1
will break site2.
- Allow a site to have only the needed libraries, to avoid bloating
the site, and help in identifying unused code.

One plan we started to go with was:

Site1.git/
Site1.git/Library/Ours - submodule link to OurLib.git/Library/Ours
Site1.git/Library/3rdParty1 - submodule link to
3rdParty1Lib.git/Library/3rdParty1

OurLib.git/Library/Ours
OurLib.git/UnitTests/Ours
OurLib.git/Library/3rdParty1 - submodule link to
3rdParty1Lib.git/Library/3rdParty1

3rdParty1Lib.git/Library/3rdParty1
3rdParty1Lib.git/UnitTests/3rdParty1

But found out that git submodule doesn't actually allow mapping a
section of a git repository, so changed it to:

Site1.git/
Site1.git/Library/Ours - symlink to submodule/OurLib/Library/Ours
Site1.git/Library/3rdParty1 - symlink to
submodule/3rdParty1Lib/Library/3rdParty1
Site1.git/submodule/OurLib - submodule OurLib.git
Site1.git/submodule/3rdParty1Lib - submodule 3rdParty1Lib.git

OurLib.git/Library/Ours
OurLib.git/UnitTests/Ours
OurLib.git/Library/3rdParty1 - symlink to
submodule/3rdParty1Lib/Library/3rdParty1
OurLib.git/submodule/3rdParty1Lib - submodule 3rdParty1Lib.git

3rdParty1Lib.git/Library/3rdParty1
3rdParty1Lib.git/UnitTests/3rdParty1

The 3rd Party Lib is not all 3rd party anymore, as we have tweaked it
to fit better in our setup.  Additionally, the 3rd party library
didn't come with unit tests.  One of the unit tests we wrote for our
use of the 3rd party ended up with a use of our library.  Putting a
submodule of OurLib into 3rdParty1Lib would create recursive
submodules, which is not something we want.

Is there a better way to organize this?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]