Re: [PATCH v2 2/2] submodule add: Fail when .git/modules/ already exists unless forced

2012-09-30 Thread Junio C Hamano
Jens Lehmann writes: >> Good point! I will add a more detailed error message (including >> the url of the default remote which is configured for the already >> present submodule repo) and teach --force to skip the test and >> resurrect that submodule repo. > > The message when "git submodule add"

[PATCH v2 2/2] submodule add: Fail when .git/modules/ already exists unless forced

2012-09-30 Thread Jens Lehmann
When adding a new submodule it can happen that .git/modules/ already contains a submodule repo, e.g. when a submodule is removed from the work tree and another submodule is added at the same path. But then the work tree of the submodule will be populated using the existing repository and not the on