Subject: Re: Limiting disk usage

From: Jakub Narębski <[email-masked]>
Date: Wed, 30 Oct 2013 16:39:02 +0100

On 2013-10-30 08:44, Piotr Krukowiecki wrote:
> On Tue, Oct 29, 2013 at 3:45 PM, Jakub Narębski<[email-masked]>  wrote:
>> On 2013-10-29 14:50, Piotr Krukowiecki wrote:

>> If they are independent projects, they should get independent repositories;
>> you can stitch them back together using git-submodule (or git-subtree).
>> reposurgeon can hel you with that.
>
> They are not totally independent projects (nor totally dependent).
> Normally you want them all, you want to create a branch/tag on all of
> them, if new directory is created you want to automatically have it
> too etc. But there are use cases when you need only some of them and
> then they can be seen as independent .
>
> git-submodule have several disadvantages for my use:
> - does not track branches (you have to specify hardcoded SHA1 instead
> of a branch name)
> - additional complexity / command layer (you have to do things like
> "submodule init", "submodule update")
> - you can't simply work on all submodules (you can't simply branch,
> merge, commit, log, diff, etc in all submodules using one command in
> top-level project)

git-submodule was created (I think) to manage loosely coupled fairly
independent projects, where you need nevertheless to ensure that
both work together (so you use specific version of subproject for
a given version of superproject).  It looks like this is not what
you have.

 From time to time you can find there ideas about adding "floating"
mode to git-submodule, but as far as I know up till now without
effect...

> git-subtree looks much better in that regard, but for example it needs
> an explicit prefix (name of "subproject") on which it operates. So you
> can't say "update everything" or "commit everything" etc. With
> hundreds of subprojects you need another layer to automate this...

git-subtree is about helping merging / embedding (or re-embedding)
of subproject history in superproject history, and extracting subproject 
history from superproject history.  But embedded subproject is just 
subdirectory to git.  It looks like it isn't what you want.

There are many projects[1] that try to solve problem of managing 
interdependent repositories, e.g.: gitslave, repo, fgit.  Maybe one
of them would be good fit for your problem.

[1]: https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools

-- 
Jakub Narębski