From: Torgil Svensson Date: Sun, 17 Dec 2006 00:21:10 GMT Subject: Re: [RFC] Submodules in GIT Message-ID: In-Reply-To: <200612161732.11746.jnareb@gmail.com> On 12/16/06, Jakub Narebski wrote: > Well, I just rather have than the definition > of sparse checkout (for example subdirectory name, or file name, > or glob pattern). This is entirely an UI issue: On 12/16/06, Torgil Svensson wrote: > is based around Linus 'module'-file and keep things simple. A git > configuration file that specifies: > * link name for reference > * local path to link > * submodule source > * submodule path to tree/blob > * submodule commit / HEAD / branch > * options (depth-limit , ...) On 12/16/06, Jakub Narebski wrote: > And if you have that, you don't need in repository, in link object. Correct. Since the commit contains all the version information, the following combinations should give the same information iff we keep the commit in the database: 1. + 2. + I used the sha1 because I wanted them to behave exactly like trees/blobs in the database for operations that can disregard the commit info. Now, if we keep the commit in the database as Linus suggests we can reach the target from there with a symlink. This would be more readable but also cost a few object lookups extra iterating over the symlink. > With sparse (for example defined by 'src/*.h') or partial (for example > defined by 'Documentation/') checkout you should be able to merge > upstream... unless conflicts are in the not checked out part. This would be a great feature! Will this conflict with path shortcuts? If so, we might consider two types of objects: "link" which cannot merge upstream and "module" which can merge upstream and contains a .git object repository. IMHO, "module" is a more intuitive name for specifying a (functionality wise fully fledged) submodule with a repository inside. "link" could be used for just mirroring a tree/blob. I'm not sure if a separation is needed on a technical level. > Have you read http://git.or.cz/gitwiki/SubprojectSupport on GitWiki? Yes > Have you tested the experimental submodule support (proof of concept) Not yet