Re: [RFC] Submodules in GIT
From: Josef Weidendorfer <hidden>
Date: 2016-08-11 19:49:02
On Saturday 02 December 2006 21:43, Martin Waitz wrote:
On Sat, Dec 02, 2006 at 02:50:45PM +0100, Josef Weidendorfer wrote:quoted
On Saturday 02 December 2006 11:04, Andy Parkins wrote:quoted
quoted
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.