From: Junio C Hamano Date: Mon, 25 Jun 2007 07:09:09 GMT Subject: Re: [PATCH] git-submodule: provide easy way of adding new submodules Message-ID: <7vps3k33ze.fsf@assigned-by-dhcp.pobox.com> In-Reply-To: <20070624210607.GC997MdfPADPa@greensroom.kotnet.org> Sven Verdoolaege writes: > To make a submodule effectively usable, the path and > a URL where the submodule can be cloned need to be stored > in .gitmodules. This subcommand takes care of setting > this information after cloning the new submodule. > Only the index is updated, so, if needed, the user may still > change the URL or switch to a different branch of the submodule > before committing. > > Signed-off-by: Sven Verdoolaege > --- > On Sun, Jun 24, 2007 at 10:50:48AM -0700, Junio C Hamano wrote: >> Sven Verdoolaege writes: >> >> > They're different because submodule update (which also calls module_clone) >> > is performed on a module that already exists in the repo and >> > was therefore checked out by git as an empty directory. If you >> > add a new submodule, then there is no reason for the subdirectory >> > to exist already. >> >> Ah, you are absolutely right. Thanks for the clarification. >> >> By the way, when I have to say "thanks for the clarification", I >> think it is an indication that the relevant parts of the code >> need a bit of commenting ;-). > > How's this ? I am not sure about the usefulness of "-b branch" thing myself, but other than that, looks very sane to me. Lars?