On Sat, Dec 01, 2012 at 04:56:02PM +0100, Jens Lehmann wrote: > Am 01.12.2012 00:52, schrieb Phil Hord: > > If I never 'submodule init' a submodule, it does not get visited by > > 'git submodule foreach', among others. I think some people use this > > behavior explicitly. > > > > On the other hand, I've also notice that a submodule which I have > > removed does not get de-inited later one. It causes my 'git submodule > > foreach' to emit errors. :-( > > I'm currently hacking on "git submodule deinit" which removes the 'url' > setting from git/config. This should do the trick for you, right? > > Just removing that submodule automagically would not work that well, as > it would deinitialize a submodule when you switch to a branch where it > isn't present and you'd have to reinitialize it when you come back. I think this is another case where we should be looping through submodules based on the revision-specific .gitmodules content, and querying the local config only to determine if the user wants to update them (to drop into them with foreach, etc.). -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy