Skip to content

Commit 072a5fb

Browse files
committed
shallow-submodules: Also test --depth clone of mod
1 parent 82349f8 commit 072a5fb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: shallow-submodule.sh

+12-4
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,27 @@ git add .gitmodules
8282
git commit -m 'shallow'
8383
cd ..
8484

85-
git clone --depth 1 --recursive "file://$(pwd)/top" top-clone
85+
git clone --recursive "file://$(pwd)/top" top-clone
8686
git --git-dir top-clone/.git/modules/mod log
8787
# two commits
8888

89-
git clone --depth 1 --recursive "file://$(pwd)/top-shallow" top-shallow-clone
89+
git clone --recursive "file://$(pwd)/top-shallow" top-shallow-clone
9090
git --git-dir top-shallow-clone/.git/modules/mod log
9191
# one commit
9292

93-
git clone --depth 1 --recursive "file://$(pwd)/top-branch" top-branch-clone
93+
git clone --recursive "file://$(pwd)/top-branch" top-branch-clone
9494
git --git-dir top-branch-clone/.git/modules/mod log
9595
# two commits
9696

97-
git clone --depth 1 --recursive "file://$(pwd)/top-branch-shallow" top-branch-shallow-clone
97+
git clone --recursive "file://$(pwd)/top-branch-shallow" top-branch-shallow-clone
9898
git --git-dir top-branch-shallow-clone/.git/modules/mod log
9999
# locally: one commit
100100
# github 2017-11, git 2.14.1: two commits
101+
102+
git clone --depth 1 "file://$(pwd)/mod" mod-clone
103+
git --git-dir mod-clone/.git log
104+
# one commit
105+
106+
git clone --depth 1 "file://$(pwd)/mod-branch" mod-branch-clone
107+
git --git-dir mod-branch-clone/.git log
108+
# one commit

0 commit comments

Comments
 (0)