author | Johan Herland <johan@herland.net> | |
Wed, 19 Aug 2009 23:07:43 +0000 (01:07 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 20 Aug 2009 23:59:50 +0000 (16:59 -0700) | ||
commit | e7fed18a89fae97655687e19f13cd802d8d70845 | |
tree | e9bd4f339a705f2290348e42a96ed69986cbe514 | tree | snapshot |
parent | e3ae4a8613151c93ffce78c674ac91c1ee34eef6 | commit | diff |
git clone: Add --recursive to automatically checkout (nested) submodules
Many projects using submodules expect all submodules to be checked out
in order to build/work correctly. A common command sequence for
developers on such projects is:
git clone url/to/project
cd project
git submodule update --init (--recursive)
This patch introduces the --recursive option to git-clone. The new
option causes git-clone to recursively clone and checkout all
submodules of the cloned project. Hence, the above command sequence
can be reduced to:
git clone --recursive url/to/project
--recursive is ignored if no checkout is done by the git-clone.
The patch also includes documentation and a selftest.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Many projects using submodules expect all submodules to be checked out
in order to build/work correctly. A common command sequence for
developers on such projects is:
git clone url/to/project
cd project
git submodule update --init (--recursive)
This patch introduces the --recursive option to git-clone. The new
option causes git-clone to recursively clone and checkout all
submodules of the cloned project. Hence, the above command sequence
can be reduced to:
git clone --recursive url/to/project
--recursive is ignored if no checkout is done by the git-clone.
The patch also includes documentation and a selftest.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-clone.txt | diff | blob | history | |
builtin-clone.c | diff | blob | history | |
t/t7407-submodule-foreach.sh | diff | blob | history |