Merge branch 'jl/submodule-add-by-name' into next
commita322082317355a298535210d5d72dcc592aaa009
authorJeff King <peff@peff.net>
Thu, 25 Oct 2012 11:15:19 +0000 (25 07:15 -0400)
committerJeff King <peff@peff.net>
Thu, 25 Oct 2012 11:15:19 +0000 (25 07:15 -0400)
treef402de20fbac8f24b516426ed5eaf9c537515885
parent0fb5876ea0a5bdadd6e6295db8aad1b9ad173f87
parent4b7c286ec74c7bb88e9e7ac2d283d86f64b6b0ea
Merge branch 'jl/submodule-add-by-name' into next

If you remove a submodule, in order to keep the repository so that
"git checkout" to an older commit in the superproject history can
resurrect the submodule, the real repository will stay in $GIT_DIR
of the superproject.  A later "git submodule add $path" to add a
different submodule at the same path will fail.  Diagnose this case
a bit better, and if the user really wants to add an unrelated
submodule at the same path, give the "--name" option to give it a
place in $GIT_DIR of the superproject that does not conflict with
the original submodule.

Will merge to 'master' in the second batch after 1.8.0 ships.

* jl/submodule-add-by-name:
  submodule add: Fail when .git/modules/<name> already exists unless forced
  Teach "git submodule add" the --name option
Documentation/git-submodule.txt
git-submodule.sh
t/t7400-submodule-basic.sh