From: Josef Weidendorfer Date: Sun, 03 Dec 2006 01:02:34 GMT Subject: Re: [RFC] Submodules in GIT Message-ID: <200612030202.34990.Josef.Weidendorfer@gmx.de> In-Reply-To: <20061202204350.GV18810@admingilde.org> On Saturday 02 December 2006 21:43, Martin Waitz wrote: > On Sat, Dec 02, 2006 at 02:50:45PM +0100, Josef Weidendorfer wrote: > > On Saturday 02 December 2006 11:04, Andy Parkins wrote: > > > > 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. > > > > That suggests that it is probably better to separate submodule repositories > > from their checked out working trees. Why not put the GITDIRs of the submodules > > in subdirectories of the supermodules GITDIR instead? > > Why not simply use a shared object database instead? Sure. I have no problem with this. But can we go one step further? AFAICS your submodules store the .git/ directories of submodules directly at submodule position in the working tree - but you have a link .git/objects into the object database of the supermodule. When the user wants to delete the submodule, he would remove this .git/ directory, too. So you loose the .git/refs of the submodule etc. I would suggest to put the submodule .git dirs into the .git dir of the supermodule.