Re: Something looks like CVS modules
On Friday 11 November 2005 22:29, Petr Baudis wrote:
Show 8 quoted lines
> Dear diary, on Fri, Nov 11, 2005 at 12:13:57PM CET, I got a letter
> where Alexander Litvinov <lan@ac-sw.com> said that...
>
> Aha. So it isn't so much about modules, but more about nested checkouts,
> described in Cogito's TODO as:
>
> * Subprojects
> ...
Interesting. So these would be multiple git repositories, which are more or less loosely coupled via same head and tag names?
Instead of putting multiple git repositories in subdirectories, these possibly could be combined into one .git/ with different index files, and simultaneously checked out files. This way, the partitioning of files does not have to follow directory boundaries (similar to the "todo" branch of git itself).
We would need a configuration for the partitioning. E.g. a .git/projects
gitk: gitk
todo: TODO TODO-docu
docu: Documentation/*
git: *
(perhaps with path remapping between checkout files and paths in the git tree objects of every subproject, to be flexible)
You would have multiple indexes: .git/index.gitk, .git/index.todo... .git/HEAD would have to hold multiple references for the currently checked out subprojects:
gitk: refs/gitk/heads/master
git: refs/git/heads/master
On commiting, the subproject partitions are checked seperatly for changes, and commits objects are done for each subproject. Fetching/merging is done on each subproject of its own.
You probably want to have multi-head tags covering all subprojects.
And for a more tight coupling of subprojects, you probably even want to have multihead commits every time a commit is done in one subproject, which leads to branches tracking the versioning of all subprojects, i.e. multihead heads ;-) I think that even subprojects of subprojects fall out naturally.
I am quite sure this can be done in a fully compatible way to Git-1: with Git-1, you have only one subproject, the empty one. It should be possible to combine multiple Git-1 repositories to a repository with multiple subprojects, where each subproject was its own project with Git-1.
Josef