git submodule add now requires a <path>

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Abhijit Menon-Sen 2008-07-30 01:23:16 +05:30 committed by Junio C Hamano
parent 1ce4790bf5
commit a56bf5850a

View File

@ -3458,7 +3458,7 @@ $ cd super
$ git init $ git init
$ for i in a b c d $ for i in a b c d
do do
git submodule add ~/git/$i git submodule add ~/git/$i $i
done done
------------------------------------------------- -------------------------------------------------
@ -3471,10 +3471,10 @@ $ ls -a
. .. .git .gitmodules a b c d . .. .git .gitmodules a b c d
------------------------------------------------- -------------------------------------------------
The `git-submodule add` command does a couple of things: The `git-submodule add <repo> <path>` command does a couple of things:
- It clones the submodule under the current directory and by default checks out - It clones the submodule from <repo> to the given <path> under the
the master branch. current directory and by default checks out the master branch.
- It adds the submodule's clone path to the linkgit:gitmodules[5] file and - It adds the submodule's clone path to the linkgit:gitmodules[5] file and
adds this file to the index, ready to be committed. adds this file to the index, ready to be committed.
- It adds the submodule's current commit ID to the index, ready to be - It adds the submodule's current commit ID to the index, ready to be