(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: { (SQ <"Test submodules on detached working tree\n"> <"\n"> < "This test verifies that \"git submodule\" initialization, update and addition works\n" > <"on detahced working trees\n"> ) } spids: [13] ) ] spids: [13] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:TEST_NO_CREATE_REPO) op:Equal rhs:{(1)} spids:[22])] spids: [22] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <"submodule on detached working tree">)} { (SQ <"\n"> <"\tgit init --bare remote &&\n"> <"\ttest_create_repo bundle1 &&\n"> <"\t(\n"> <"\t\tcd bundle1 &&\n"> <"\t\ttest_commit \"shoot\" &&\n"> <"\t\tgit rev-parse --verify HEAD >../expect\n"> <"\t) &&\n"> <"\tmkdir home &&\n"> <"\t(\n"> <"\t\tcd home &&\n"> <"\t\tGIT_WORK_TREE=\"$(pwd)\" &&\n"> <"\t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n"> <"\t\texport GIT_WORK_TREE GIT_DIR &&\n"> <"\t\tgit clone --bare ../remote .dotfiles &&\n"> <"\t\tgit submodule add ../bundle1 .vim/bundle/sogood &&\n"> <"\t\ttest_commit \"sogood\" &&\n"> <"\t\t(\n"> <"\t\t\tunset GIT_WORK_TREE GIT_DIR &&\n"> <"\t\t\tcd .vim/bundle/sogood &&\n"> <"\t\t\tgit rev-parse --verify HEAD >actual &&\n"> <"\t\t\ttest_cmp ../../../../expect actual\n"> <"\t\t) &&\n"> <"\t\tgit push origin master\n"> <"\t) &&\n"> <"\tmkdir home2 &&\n"> <"\t(\n"> <"\t\tcd home2 &&\n"> <"\t\tgit clone --bare ../remote .dotfiles &&\n"> <"\t\tGIT_WORK_TREE=\"$(pwd)\" &&\n"> <"\t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n"> <"\t\texport GIT_WORK_TREE GIT_DIR &&\n"> <"\t\tgit checkout master &&\n"> <"\t\tgit submodule update --init &&\n"> <"\t\t(\n"> <"\t\t\tunset GIT_WORK_TREE GIT_DIR &&\n"> <"\t\t\tcd .vim/bundle/sogood &&\n"> <"\t\t\tgit rev-parse --verify HEAD >actual &&\n"> <"\t\t\ttest_cmp ../../../../expect actual\n"> <"\t\t)\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"submodule on detached working pointed by core.worktree">)} { (SQ <"\n"> <"\tmkdir home3 &&\n"> <"\t(\n"> <"\t\tcd home3 &&\n"> <"\t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n"> <"\t\texport GIT_DIR &&\n"> <"\t\tgit clone --bare ../remote \"$GIT_DIR\" &&\n"> <"\t\tgit config core.bare false &&\n"> <"\t\tgit config core.worktree .. &&\n"> <"\t\tgit checkout master &&\n"> <"\t\tgit submodule add ../bundle1 .vim/bundle/dupe &&\n"> <"\t\ttest_commit \"dupe\" &&\n"> <"\t\tgit push origin master\n"> <"\t) &&\n"> <"\t(\n"> <"\t\tcd home &&\n"> <"\t\tGIT_DIR=\"$(pwd)/.dotfiles\" &&\n"> <"\t\texport GIT_DIR &&\n"> <"\t\tgit config core.bare false &&\n"> <"\t\tgit config core.worktree .. &&\n"> <"\t\tgit pull &&\n"> <"\t\tgit submodule update --init &&\n"> <"\t\ttest -f .vim/bundle/dupe/shoot.t\n"> <"\t)\n"> ) } ) (C {(test_done)}) ] )