From: Junio C Hamano Date: Mon, 15 Jul 2013 17:28:48 +0000 (-0700) Subject: Merge branch 'fg/submodule-clone-depth' X-Git-Tag: v1.8.4-rc0~55 X-Git-Url: http://git.scripts.mit.edu/?a=commitdiff_plain;h=2bb7aface663f4d9f01d08282ee38cf8f636df0d;p=git.git Merge branch 'fg/submodule-clone-depth' Allow shallow-cloning of submodules with "git submodule update". * fg/submodule-clone-depth: Add --depth to submodule update/add --- 2bb7aface663f4d9f01d08282ee38cf8f636df0d diff --cc t/t7400-submodule-basic.sh index 50e6ad7458,42cd6de463..5ee97b003a --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@@ -948,19 -868,19 +948,35 @@@ test_expect_success 'submodule deinit f test -n "$(git config --get-regexp "submodule\.example\.")" ' +test_expect_success 'submodule with UTF-8 name' ' + svname=$(printf "\303\245 \303\244\303\266") && + mkdir "$svname" && + ( + cd "$svname" && + git init && + >sub && + git add sub && + git commit -m "init sub" + ) && + test_config core.precomposeunicode true && + git submodule add ./"$svname" && + git submodule >&2 && + test -n "$(git submodule | grep "$svname")" +' ++ + 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