From: Torgil Svensson Date: Sat, 16 Dec 2006 08:40:53 GMT Subject: Re: [RFC] Submodules in GIT Message-ID: In-Reply-To: On 12/16/06, Jakub Narebski wrote: > > 100644 blob > > >> > > > > Sorry, I was sloppy and forgot the names: > > > > 100644 blob README > > 100644 blob REPORTING-BUGS > > 100644 link AUTHORS > > 040000 tree arch > > 040000 tree block > > 040000 link misc > > > > Now it doesn't looks like trees/blobs anymore so maybe a link object > > is handy: > > README > > 100644 blob REPORTING-BUGS > > 100644 link AUTHORS > > 040000 tree arch > > 040000 tree block > > 040000 link misc > > > > link-object: > > > > > > What do you need for in link-object? Wouldn't you > use usually the sha1 of top tree of a commit, which is uniquely defined > by commit object, so you need only ? > 1. "Sparse" repository's - In my example, I want to cherry-pick header-files or binary-files from different projects without fetching all, potentially huge, submodules in their entirety. Imaging having X, kernel, gcc, gtk and libc6 as sub-projects and you really only care about some header files. 2. Super-module directory-hierarchy independent from submodules. Super-project want to have the header-files and binaries it's own way. This also gives version controlled file-collections, the "release case" in my example - collecting different binaries and header-files from different submodules together in a new directory-structure, add some documentation and configuration files and get the whole thing under strong version-control down to the beginning of time for each little component. 3. Super-module development independent of submodules - If we have the tree/blob-object with all it contents in the database many git-operations can act as the link (commit) wasn't there since we have access to all relevant data to work with. This makes it easy to clone the super-project and work on it seamlessly without having to care about submodules or mapping up submodule repository's (unless you want to modify the links or the data underneath it of course).