3 # Copyright (c) 2009 Red Hat, Inc.
6 test_description
='Test updating submodules
8 This test verifies that "git submodule update" detaches the HEAD of the
9 submodule and "git submodule update --rebase/--merge" does not detach the HEAD.
12 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
13 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
20 sha_main
=$
(git rev-list
--max-count=1 main
)
21 sha_head
=$
(git rev-list
--max-count=1 HEAD
)
23 test "$sha_main" = "$sha_head"
27 test_expect_success
'setup a submodule tree' '
28 git config --global protocol.file.allow always &&
32 git commit -m upstream &&
34 git clone super submodule &&
35 git clone super rebasing &&
36 git clone super merging &&
37 git clone super none &&
39 git submodule add ../submodule submodule &&
41 git commit -m "submodule" &&
42 git submodule init submodule
45 echo "line2" > file &&
47 git commit -m "Commit 2"
51 git pull --rebase origin
54 git commit -m "submodule update"
57 git submodule add ../rebasing rebasing &&
59 git commit -m "rebasing"
62 git submodule add ../merging merging &&
64 git commit -m "rebasing"
67 git submodule add ../none none &&
71 git clone . recursivesuper &&
72 ( cd recursivesuper &&
73 git submodule add ../super super
77 test_expect_success
'update --remote falls back to using HEAD' '
78 test_create_repo main-branch-submodule &&
79 test_commit -C main-branch-submodule initial &&
81 test_create_repo main-branch &&
82 git -C main-branch submodule add ../main-branch-submodule &&
83 git -C main-branch commit -m add-submodule &&
85 git -C main-branch-submodule switch -c hello &&
86 test_commit -C main-branch-submodule world &&
88 git clone --recursive main-branch main-branch-clone &&
89 git -C main-branch-clone submodule update --remote main-branch-submodule &&
90 test_path_exists main-branch-clone/main-branch-submodule/world.t
93 test_expect_success
'submodule update detaching the HEAD ' '
94 (cd super/submodule &&
95 git reset --hard HEAD~1
101 git submodule update submodule &&
107 test_expect_success
'submodule update from subdirectory' '
108 (cd super/submodule &&
109 git reset --hard HEAD~1
116 git submodule update ../submodule &&
122 supersha1
=$
(git
-C super rev-parse HEAD
)
123 mergingsha1
=$
(git
-C super
/merging rev-parse HEAD
)
124 nonesha1
=$
(git
-C super
/none rev-parse HEAD
)
125 rebasingsha1
=$
(git
-C super
/rebasing rev-parse HEAD
)
126 submodulesha1
=$
(git
-C super
/submodule rev-parse HEAD
)
130 Submodule path '../super': checked out '$supersha1'
131 Submodule path '../super/merging': checked out '$mergingsha1'
132 Submodule path '../super/none': checked out '$nonesha1'
133 Submodule path '../super/rebasing': checked out '$rebasingsha1'
134 Submodule path '../super/submodule': checked out '$submodulesha1'
138 Cloning into '$pwd/recursivesuper/super/merging'...
139 Cloning into '$pwd/recursivesuper/super/none'...
140 Cloning into '$pwd/recursivesuper/super/rebasing'...
141 Cloning into '$pwd/recursivesuper/super/submodule'...
142 Submodule 'merging' ($pwd/merging) registered for path '../super/merging'
143 Submodule 'none' ($pwd/none) registered for path '../super/none'
144 Submodule 'rebasing' ($pwd/rebasing) registered for path '../super/rebasing'
145 Submodule 'submodule' ($pwd/submodule) registered for path '../super/submodule'
152 test_expect_success
'submodule update --init --recursive from subdirectory' '
153 git -C recursivesuper/super reset --hard HEAD^ &&
154 (cd recursivesuper &&
157 git submodule update --init --recursive ../super >../../actual 2>../../actual2
159 test_cmp expect actual &&
160 sort actual2 >actual2.sorted &&
161 test_cmp expect2 actual2.sorted
165 Submodule 'foo/sub' ($pwd/withsubs/../rebasing) registered for path 'sub'
168 test_expect_success
'submodule update --init from and of subdirectory' '
172 git submodule add "$(pwd)/../rebasing" foo/sub &&
174 git submodule deinit -f sub &&
175 git submodule update --init sub 2>../../actual2
178 test_cmp expect2 actual2
181 test_expect_success
'submodule update does not fetch already present commits' '
183 echo line3 >> file &&
186 git commit -m "upstream line3"
188 (cd super/submodule &&
189 head=$(git rev-parse --verify HEAD) &&
190 echo "Submodule path ${SQ}submodule$SQ: checked out $SQ$head$SQ" > ../../expected &&
191 git reset --hard HEAD~1
194 git submodule update > ../actual 2> ../actual.err
196 test_cmp expected actual &&
197 test_must_be_empty actual.err
200 test_expect_success
'submodule update should fail due to local changes' '
201 (cd super/submodule &&
202 git reset --hard HEAD~1 &&
203 echo "local change" > file
209 test_must_fail git submodule update submodule
212 test_expect_success
'submodule update should throw away changes with --force ' '
217 git submodule update --force submodule &&
223 test_expect_success
'submodule update --force forcibly checks out submodules' '
228 git submodule update --force submodule &&
230 test "$(git status -s file)" = ""
235 test_expect_success
'submodule update --remote should fetch upstream changes' '
237 echo line4 >> file &&
240 git commit -m "upstream line4"
243 git submodule update --remote --force submodule &&
245 test "$(git log -1 --oneline)" = "$(GIT_DIR=../../submodule/.git git log -1 --oneline)"
249 test_expect_success
'submodule update --remote should fetch upstream changes with .' '
252 git config -f .gitmodules submodule."submodule".branch "." &&
253 git add .gitmodules &&
254 git commit -m "submodules: update from the respective superproject branch"
258 echo line4a >> file &&
261 git commit -m "upstream line4a" &&
262 git checkout -b test-branch &&
263 test_commit on-test-branch
267 git submodule update --remote --force submodule &&
268 git -C submodule log -1 --oneline >actual &&
269 git -C ../submodule log -1 --oneline main >expect &&
270 test_cmp expect actual &&
271 git checkout -b test-branch &&
272 git submodule update --remote --force submodule &&
273 git -C submodule log -1 --oneline >actual &&
274 git -C ../submodule log -1 --oneline test-branch >expect &&
275 test_cmp expect actual &&
277 git branch -d test-branch &&
278 git reset --hard HEAD^
282 test_expect_success
'local config should override .gitmodules branch' '
284 git checkout test-branch &&
285 echo line5 >> file &&
288 git commit -m "upstream line5" &&
292 git config submodule.submodule.branch test-branch &&
293 git submodule update --remote --force submodule &&
295 test "$(git log -1 --oneline)" = "$(GIT_DIR=../../submodule/.git git log -1 --oneline test-branch)"
299 test_expect_success
'submodule update --rebase staying on main' '
300 (cd super/submodule &&
307 git submodule update --rebase submodule &&
313 test_expect_success
'submodule update --merge staying on main' '
314 (cd super/submodule &&
315 git reset --hard HEAD~1
321 git submodule update --merge submodule &&
327 test_expect_success
'submodule update - rebase in .git/config' '
329 git config submodule.submodule.update rebase
331 (cd super/submodule &&
332 git reset --hard HEAD~1
338 git submodule update submodule &&
344 test_expect_success
'submodule update - checkout in .git/config but --rebase given' '
346 git config submodule.submodule.update checkout
348 (cd super/submodule &&
349 git reset --hard HEAD~1
355 git submodule update --rebase submodule &&
361 test_expect_success
'submodule update - merge in .git/config' '
363 git config submodule.submodule.update merge
365 (cd super/submodule &&
366 git reset --hard HEAD~1
372 git submodule update submodule &&
378 test_expect_success
'submodule update - checkout in .git/config but --merge given' '
380 git config submodule.submodule.update checkout
382 (cd super/submodule &&
383 git reset --hard HEAD~1
389 git submodule update --merge submodule &&
395 test_expect_success
'submodule update - checkout in .git/config' '
397 git config submodule.submodule.update checkout
399 (cd super/submodule &&
400 git reset --hard HEAD^
406 git submodule update submodule &&
412 test_expect_success
'submodule update - command in .git/config' '
414 git config submodule.submodule.update "!git checkout"
416 (cd super/submodule &&
417 git reset --hard HEAD^
423 git submodule update submodule &&
429 test_expect_success
'submodule update - command in .gitmodules is rejected' '
430 test_when_finished "git -C super reset --hard HEAD^" &&
431 git -C super config -f .gitmodules submodule.submodule.update "!false" &&
432 git -C super commit -a -m "add command to .gitmodules file" &&
433 git -C super/submodule reset --hard $submodulesha1^ &&
434 test_must_fail git -C super submodule update submodule
437 test_expect_success
'fsck detects command in .gitmodules' '
438 git init command-in-gitmodules &&
440 cd command-in-gitmodules &&
441 git submodule add ../submodule submodule &&
442 test_commit adding-submodule &&
444 git config -f .gitmodules submodule.submodule.update "!false" &&
445 git add .gitmodules &&
446 test_commit configuring-update &&
447 test_must_fail git fsck
452 Execution of 'false $submodulesha1' failed in submodule path 'submodule'
455 test_expect_success
'submodule update - command in .git/config catches failure' '
457 git config submodule.submodule.update "!false"
459 (cd super/submodule &&
460 git reset --hard $submodulesha1^
463 test_must_fail git submodule update submodule 2>../actual
465 test_cmp actual expect
469 Execution of 'false $submodulesha1' failed in submodule path '../submodule'
472 test_expect_success
'submodule update - command in .git/config catches failure -- subdirectory' '
474 git config submodule.submodule.update "!false"
476 (cd super/submodule &&
477 git reset --hard $submodulesha1^
480 mkdir tmp && cd tmp &&
481 test_must_fail git submodule update ../submodule 2>../../actual
483 test_cmp actual expect
486 test_expect_success
'submodule update - command run for initial population of submodule' '
487 cat >expect <<-EOF &&
488 Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\''
490 rm -rf super/submodule &&
491 test_must_fail git -C super submodule update 2>actual &&
492 test_cmp expect actual &&
493 git -C super submodule update --checkout
497 Execution of 'false $submodulesha1' failed in submodule path '../super/submodule'
498 Failed to recurse into submodule path '../super'
501 test_expect_success
'recursive submodule update - command in .git/config catches failure -- subdirectory' '
502 (cd recursivesuper &&
503 git submodule update --remote super &&
505 git commit -m "update to latest to have more than one commit in submodules"
507 git -C recursivesuper/super config submodule.submodule.update "!false" &&
508 git -C recursivesuper/super/submodule reset --hard $submodulesha1^ &&
509 (cd recursivesuper &&
510 mkdir -p tmp && cd tmp &&
511 test_must_fail git submodule update --recursive ../super 2>../../actual
513 test_cmp actual expect
516 test_expect_success
'submodule init does not copy command into .git/config' '
517 test_when_finished "git -C super update-index --force-remove submodule1" &&
518 test_when_finished git config -f super/.gitmodules \
519 --remove-section submodule.submodule1 &&
521 git ls-files -s submodule >out &&
522 H=$(cut -d" " -f2 out) &&
524 git update-index --add --cacheinfo 160000 $H submodule1 &&
525 git config -f .gitmodules submodule.submodule1.path submodule1 &&
526 git config -f .gitmodules submodule.submodule1.url ../submodule &&
527 git config -f .gitmodules submodule.submodule1.update !false &&
528 test_must_fail git submodule init submodule1 &&
529 test_expect_code 1 git config submodule.submodule1.update >actual &&
530 test_must_be_empty actual
534 test_expect_success
'submodule init picks up rebase' '
536 git config -f .gitmodules submodule.rebasing.update rebase &&
537 git submodule init rebasing &&
538 test "rebase" = "$(git config submodule.rebasing.update)"
542 test_expect_success
'submodule init picks up merge' '
544 git config -f .gitmodules submodule.merging.update merge &&
545 git submodule init merging &&
546 test "merge" = "$(git config submodule.merging.update)"
550 test_expect_success
'submodule update --merge - ignores --merge for new submodules' '
551 test_config -C super submodule.submodule.update checkout &&
554 git submodule update submodule &&
555 git status -s submodule >expect &&
557 git submodule update --merge submodule &&
558 git status -s submodule >actual &&
559 test_cmp expect actual
563 test_expect_success
'submodule update --rebase - ignores --rebase for new submodules' '
564 test_config -C super submodule.submodule.update checkout &&
567 git submodule update submodule &&
568 git status -s submodule >expect &&
570 git submodule update --rebase submodule &&
571 git status -s submodule >actual &&
572 test_cmp expect actual
576 test_expect_success
'submodule update ignores update=merge config for new submodules' '
579 git submodule update submodule &&
580 git status -s submodule >expect &&
582 git config submodule.submodule.update merge &&
583 git submodule update submodule &&
584 git status -s submodule >actual &&
585 git config --unset submodule.submodule.update &&
586 test_cmp expect actual
590 test_expect_success
'submodule update ignores update=rebase config for new submodules' '
593 git submodule update submodule &&
594 git status -s submodule >expect &&
596 git config submodule.submodule.update rebase &&
597 git submodule update submodule &&
598 git status -s submodule >actual &&
599 git config --unset submodule.submodule.update &&
600 test_cmp expect actual
604 test_expect_success
'submodule init picks up update=none' '
606 git config -f .gitmodules submodule.none.update none &&
607 git submodule init none &&
608 test "none" = "$(git config submodule.none.update)"
612 test_expect_success
'submodule update - update=none in .git/config' '
614 git config submodule.submodule.update none &&
619 git diff --name-only >out &&
620 grep ^submodule$ out &&
621 git submodule update &&
622 git diff --name-only >out &&
623 grep ^submodule$ out &&
627 git config --unset submodule.submodule.update &&
628 git submodule update submodule
632 test_expect_success
'submodule update - update=none in .git/config but --checkout given' '
634 git config submodule.submodule.update none &&
639 git diff --name-only >out &&
640 grep ^submodule$ out &&
641 git submodule update --checkout &&
642 git diff --name-only >out &&
643 ! grep ^submodule$ out &&
647 git config --unset submodule.submodule.update
651 test_expect_success
'submodule update --init skips submodule with update=none' '
653 git add .gitmodules &&
654 git commit -m ".gitmodules"
656 git clone super cloned &&
658 git submodule update --init &&
659 test_path_exists submodule/.git &&
660 test_path_is_missing none/.git
664 test_expect_success
'submodule update continues after checkout error' '
666 git reset --hard HEAD &&
667 git submodule add ../submodule submodule2 &&
668 git submodule init &&
669 git commit -am "new_submodule" &&
671 git rev-parse --verify HEAD >../expect
674 test_commit "update_submodule" file
677 test_commit "update_submodule2" file
680 git add submodule2 &&
681 git commit -m "two_new_submodule_commits" &&
685 git checkout HEAD^ &&
686 test_must_fail git submodule update &&
688 git rev-parse --verify HEAD >../actual
690 test_cmp expect actual
693 test_expect_success
'submodule update continues after recursive checkout error' '
695 git reset --hard HEAD &&
697 git submodule update &&
699 git submodule add ../submodule subsubmodule &&
700 git submodule init &&
701 git commit -m "new_subsubmodule"
704 git commit -m "update_submodule" &&
707 test_commit "update_subsubmodule" file
709 git add subsubmodule &&
710 test_commit "update_submodule_again" file &&
712 test_commit "update_subsubmodule_again" file
714 test_commit "update_submodule_again_again" file
717 git rev-parse --verify HEAD >../expect &&
718 test_commit "update_submodule2_again" file
721 git add submodule2 &&
722 git commit -m "new_commits" &&
723 git checkout HEAD^ &&
725 git checkout HEAD^ &&
730 test_must_fail git submodule update --recursive &&
732 git rev-parse --verify HEAD >../actual
734 test_cmp expect actual
738 test_expect_success
'submodule update exit immediately in case of merge conflict' '
741 git reset --hard HEAD &&
744 git reset --hard HEAD
747 git submodule update --recursive &&
749 test_commit "update_submodule_2" file
752 test_commit "update_submodule2_2" file
755 git add submodule2 &&
756 git commit -m "two_new_submodule_commits" &&
759 test_commit "conflict" file &&
760 echo "conflict" > file
762 git checkout HEAD^ &&
764 git rev-parse --verify HEAD >../expect
766 git config submodule.submodule.update merge &&
767 test_must_fail git submodule update &&
769 git rev-parse --verify HEAD >../actual
771 test_cmp expect actual
775 test_expect_success
'submodule update exit immediately after recursive rebase error' '
778 git reset --hard HEAD &&
780 git reset --hard HEAD &&
781 git submodule update --recursive
784 test_commit "update_submodule_3" file
787 test_commit "update_submodule2_3" file
790 git add submodule2 &&
791 git commit -m "two_new_submodule_commits" &&
794 test_commit "conflict2" file &&
795 echo "conflict" > file
797 git checkout HEAD^ &&
799 git rev-parse --verify HEAD >../expect
801 git config submodule.submodule.update rebase &&
802 test_must_fail git submodule update &&
804 git rev-parse --verify HEAD >../actual
806 test_cmp expect actual
810 test_expect_success
'add different submodules to the same path' '
812 git submodule add ../submodule s1 &&
813 test_must_fail git submodule add ../merging s1
817 test_expect_success
'submodule add places git-dir in superprojects git-dir' '
820 git submodule add ../submodule deeper/submodule &&
821 (cd deeper/submodule &&
822 git log > ../../expected
824 (cd .git/modules/deeper/submodule &&
825 git log > ../../../../actual
827 test_cmp expected actual
831 test_expect_success
'submodule update places git-dir in superprojects git-dir' '
833 git commit -m "added submodule"
835 git clone super super2 &&
837 git submodule init deeper/submodule &&
838 git submodule update &&
839 (cd deeper/submodule &&
840 git log > ../../expected
842 (cd .git/modules/deeper/submodule &&
843 git log > ../../../../actual
845 test_cmp expected actual
849 test_expect_success
'submodule add places git-dir in superprojects git-dir recursive' '
851 (cd deeper/submodule &&
852 git submodule add ../submodule subsubmodule &&
854 git log > ../../../expected
856 git commit -m "added subsubmodule" &&
859 (cd .git/modules/deeper/submodule/modules/subsubmodule &&
860 git log > ../../../../../actual
862 git add deeper/submodule &&
863 git commit -m "update submodule" &&
865 test_cmp expected actual
869 test_expect_success
'submodule update places git-dir in superprojects git-dir recursive' '
870 mkdir super_update_r &&
871 (cd super_update_r &&
874 mkdir subsuper_update_r &&
875 (cd subsuper_update_r &&
878 mkdir subsubsuper_update_r &&
879 (cd subsubsuper_update_r &&
882 git clone subsubsuper_update_r subsubsuper_update_r2 &&
883 (cd subsubsuper_update_r2 &&
884 test_commit "update_subsubsuper" file &&
887 git clone subsuper_update_r subsuper_update_r2 &&
888 (cd subsuper_update_r2 &&
889 test_commit "update_subsuper" file &&
890 git submodule add ../subsubsuper_update_r subsubmodule &&
891 git commit -am "subsubmodule" &&
894 git clone super_update_r super_update_r2 &&
895 (cd super_update_r2 &&
896 test_commit "update_super" file &&
897 git submodule add ../subsuper_update_r submodule &&
898 git commit -am "submodule" &&
901 rm -rf super_update_r2 &&
902 git clone super_update_r super_update_r2 &&
903 (cd super_update_r2 &&
904 git submodule update --init --recursive >actual &&
905 test_i18ngrep "Submodule path .submodule/subsubmodule.: checked out" actual &&
906 (cd submodule/subsubmodule &&
907 git log > ../../expected
909 (cd .git/modules/submodule/modules/subsubmodule &&
910 git log > ../../../../../actual
912 test_cmp expected actual
916 test_expect_success
'submodule add properly re-creates deeper level submodules' '
918 git reset --hard main &&
920 git submodule add --force ../submodule deeper/submodule
924 test_expect_success
'submodule update properly revives a moved submodule' '
926 H=$(git rev-parse --short HEAD) &&
927 git commit -am "pre move" &&
928 H2=$(git rev-parse --short HEAD) &&
930 sed "s/$H/XXX/" out >expect &&
931 H=$(cd submodule2 && git rev-parse HEAD) &&
932 git rm --cached submodule2 &&
934 mkdir -p "moved/sub module" &&
935 git update-index --add --cacheinfo 160000 $H "moved/sub module" &&
936 git config -f .gitmodules submodule.submodule2.path "moved/sub module" &&
937 git commit -am "post move" &&
938 git submodule update &&
940 sed "s/$H2/XXX/" out >actual &&
941 test_cmp expect actual
945 test_expect_success SYMLINKS
'submodule update can handle symbolic links in pwd' '
946 mkdir -p linked/dir &&
947 ln -s linked/dir linkto &&
949 git clone "$TRASH_DIRECTORY"/super_update_r2 super &&
951 git submodule update --init --recursive
956 test_expect_success
'submodule update clone shallow submodule' '
957 test_when_finished "rm -rf super3" &&
958 first=$(git -C cloned rev-parse HEAD:submodule) &&
959 second=$(git -C submodule rev-parse HEAD) &&
960 commit_count=$(git -C submodule rev-list --count $first^..$second) &&
961 git clone cloned super3 &&
965 sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
966 mv -f .gitmodules.tmp .gitmodules &&
967 git submodule update --init --depth=$commit_count &&
968 git -C submodule log --oneline >out &&
969 test_line_count = 1 out
973 test_expect_success
'submodule update clone shallow submodule outside of depth' '
974 test_when_finished "rm -rf super3" &&
975 git clone cloned super3 &&
979 sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
980 mv -f .gitmodules.tmp .gitmodules &&
981 # Some protocol versions (e.g. 2) support fetching
982 # unadvertised objects, so restrict this test to v0.
983 test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
984 git submodule update --init --depth=1 2>actual &&
985 test_i18ngrep "Direct fetching of that commit failed." actual &&
986 git -C ../submodule config uploadpack.allowReachableSHA1InWant true &&
987 git submodule update --init --depth=1 >actual &&
988 git -C submodule log --oneline >out &&
989 test_line_count = 1 out
993 test_expect_success
'submodule update --recursive drops module name before recursing' '
995 (cd deeper/submodule/subsubmodule &&
998 git submodule update --recursive deeper/submodule >actual &&
999 test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual
1003 test_expect_success
'submodule update can be run in parallel' '
1005 GIT_TRACE=$(pwd)/trace.out git submodule update --jobs 7 &&
1006 grep "7 tasks" trace.out &&
1007 git config submodule.fetchJobs 8 &&
1008 GIT_TRACE=$(pwd)/trace.out git submodule update &&
1009 grep "8 tasks" trace.out &&
1010 GIT_TRACE=$(pwd)/trace.out git submodule update --jobs 9 &&
1011 grep "9 tasks" trace.out
1015 test_expect_success
'git clone passes the parallel jobs config on to submodules' '
1016 test_when_finished "rm -rf super4" &&
1017 GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules --jobs 7 . super4 &&
1018 grep "7 tasks" trace.out &&
1020 git config --global submodule.fetchJobs 8 &&
1021 GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules . super4 &&
1022 grep "8 tasks" trace.out &&
1024 GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules --jobs 9 . super4 &&
1025 grep "9 tasks" trace.out &&
1029 test_expect_success
'submodule update --quiet passes quietness to merge/rebase' '
1031 test_commit -C rebasing message &&
1032 git submodule update --rebase --quiet >out 2>err &&
1033 test_must_be_empty out &&
1034 test_must_be_empty err &&
1035 git submodule update --rebase -v >out 2>err &&
1036 test_file_not_empty out &&
1037 test_must_be_empty err
1041 test_expect_success
'submodule update --quiet passes quietness to fetch with a shallow clone' '
1042 test_when_finished "rm -rf super4 super5 super6" &&
1043 git clone . super4 &&
1045 git submodule add --quiet file://"$TRASH_DIRECTORY"/submodule submodule3 &&
1046 git commit -am "setup submodule3"
1049 test_commit line6 file
1051 git clone super4 super5 &&
1053 git submodule update --quiet --init --depth=1 submodule3 >out 2>err &&
1054 test_must_be_empty out &&
1055 test_must_be_empty err
1057 git clone super4 super6 &&
1059 git submodule update --init --depth=1 submodule3 >out 2>err &&
1060 test_file_not_empty out &&
1061 test_file_not_empty err