summaryrefslogtreecommitdiff
path: root/t/t7406-submodule-update.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7406-submodule-update.sh')
-rwxr-xr-xt/t7406-submodule-update.sh24
1 files changed, 17 insertions, 7 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index a4ffea0dbe..e0a06e25e7 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -685,14 +685,24 @@ test_expect_success 'submodule update properly revives a moved submodule' '
test_expect_success SYMLINKS 'submodule update can handle symbolic links in pwd' '
mkdir -p linked/dir &&
ln -s linked/dir linkto &&
- (
- cd linkto &&
- git clone "$TRASH_DIRECTORY"/super_update_r2 super &&
- (
- cd super &&
- git submodule update --init --recursive
- )
+ (cd linkto &&
+ git clone "$TRASH_DIRECTORY"/super_update_r2 super &&
+ (cd super &&
+ git submodule update --init --recursive
+ )
)
'
+test_expect_success 'submodule update clone shallow submodule' '
+ git clone cloned super3 &&
+ pwd=$(pwd)
+ (cd super3 &&
+ sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
+ mv -f .gitmodules.tmp .gitmodules &&
+ git submodule update --init --depth=3
+ (cd submodule &&
+ test 1 = $(git log --oneline | wc -l)
+ )
+ )
+'
test_done