Re: [PATCH] git-submodule: provide easy way of adding new submodules
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:18
Sven Verdoolaege [off-list ref] 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 <redacted> --- On Sun, Jun 24, 2007 at 10:50:48AM -0700, Junio C Hamano wrote:quoted
Sven Verdoolaege [off-list ref] writes:quoted
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?