Re: [RFC] Submodules in GIT
- From
- Andy Parkins <andyparkins@gmail.com>
- Date
- Dec 2, 2006, 10:04 UTC
- Message-ID
- <200612021004.22236.andyparkins@gmail.com>
- In-Reply-To
- <20061201220821.GL18810@admingilde.org>
On Friday 2006, December 01 22:08, Martin Waitz wrote:
Show 5 quoted lines
> > echo $SUBMODULE_HASH > > > submodule/.git/refs/supermodules/commit$SUPERMODULE_HASH > > I guess you are aware that you have to scan _all_ trees inside _all_ > supermodule commits for possible references.
No you don't; you do it as part of the appropriate normal operations.
* supermodule commit - scan the current tree for "link" objects in the tree. If you find one write the reference in the submodule. * adding a new submodule - if this is a new submodule there can't be any references in the supermodule already. * cloning a supermodule, every new commit that gets written in the supermodule gets checked from "link" objects.
> So what do you do with deleted submodules? > You wouldn't want them to still sit around in your working directory, > but you still have to preserve them.
Now that is a tricky one. Mind you, I think that problem exists for any implementation. I haven't got a good answer for that.
Andy
-- Dr Andrew Parkins, M Eng (Hons), AMIEE