From: Lars Hjemli Date: Wed, 09 Jan 2008 10:42:40 GMT Subject: Re: [PATCH] - Added recurse command to git submodule Message-ID: <8c5c35580801090242g3f755814pa56e896d0a8723bb@mail.gmail.com> In-Reply-To: <7vmyrfjsw1.fsf@gitster.siamese.dyndns.org> On Jan 9, 2008 9:38 AM, Junio C Hamano wrote: > I am not still convinced that a subcommand other than init, > which is started recursively, should initialize and update > submodules that are uninitialized. I very much agree; this behaviour would break the current 'usage model'. > I suspect that it might be a saner approach to: > > - allow "git submodule recurse init [-d depth]" (although I am > not sure if limit by depth is so useful in practice -- only > experience will tell us) to auto-initialize the uninitialized > submodules; A possible extension is to specifiy "inter-submodule" paths to the init subcommand, i.e. for a possible KDE layout: git submodule -r init kdelibs kdelibs/admin This should then recursively initialize the kdelibs submodule and the admin-submodule (in the kdelibs submodule). Btw: from my reading of the code, the git-command specified for 'recurse' will be done top-to-bottom: I guess that's what you want for something like 'git submodule recurse diff', but not for something like 'git submodule recurse commit' (but IMHO the latter one should never be executed ;-) -- larsh