diff options
author | Fredrik Gustafsson <iveqy@iveqy.com> | 2013-07-02 23:42:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-03 10:33:32 -0700 |
commit | 275cd184d52b5b81cb89e4ec33e540fb2ae61c1f (patch) | |
tree | bbc8d455ea6b67d31c4c2079eada1e7dcf9d927f /t/t7400-submodule-basic.sh | |
parent | edca4152560522a431a51fc0a06147fc680b5b18 (diff) | |
download | git-275cd184d52b5b81cb89e4ec33e540fb2ae61c1f.tar.gz |
Add --depth to submodule update/addfg/submodule-clone-depth
Add the --depth option to the add and update commands of "git submodule",
which is then passed on to the clone command. This is useful when the
submodule(s) are huge and you're not really interested in anything but
the latest commit.
Tests are added and some indention adjustments were made to conform to the
rest of the testfile on "submodule update can handle symbolic links in pwd".
Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-x | t/t7400-submodule-basic.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index ff265353a3..42cd6de463 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -868,4 +868,19 @@ test_expect_success 'submodule deinit fails when submodule has a .git directory test -n "$(git config --get-regexp "submodule\.example\.")" ' +test_expect_success 'submodule add clone shallow submodule' ' + mkdir super && + pwd=$(pwd) + ( + cd super && + git init && + git submodule add --depth=1 file://"$pwd"/example2 submodule && + ( + cd submodule && + test 1 = $(git log --oneline | wc -l) + ) + ) +' + + test_done |