(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"ext::cmd remote \"connect\" helper">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(setup)} { (SQ <"\n"> <"\ttest_tick &&\n"> <"\tgit commit --allow-empty -m initial &&\n"> <"\ttest_tick &&\n"> <"\tgit commit --allow-empty -m second &&\n"> <"\ttest_tick &&\n"> <"\tgit commit --allow-empty -m third &&\n"> <"\ttest_tick &&\n"> <"\tgit tag -a -m \"tip three\" three &&\n"> <"\n"> <"\ttest_tick &&\n"> <"\tgit commit --allow-empty -m fourth\n"> ) } ) (C {(test_expect_success)} {(clone)} { (SQ <"\n"> <"\tcmd=$(echo \"echo >&2 ext::sh invoked && %S ..\" | sed -e \"s/ /% /g\") &&\n"> <"\tgit clone \"ext::sh -c %S% .\" dst &&\n"> <"\tgit for-each-ref refs/heads/ refs/tags/ >expect &&\n"> <"\t(\n"> <"\t\tcd dst &&\n"> <"\t\tgit config remote.origin.url \"ext::sh -c $cmd\" &&\n"> <"\t\tgit for-each-ref refs/heads/ refs/tags/\n"> <"\t) >actual &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"update following tag">)} { (SQ <"\n"> <"\ttest_tick &&\n"> <"\tgit commit --allow-empty -m fifth &&\n"> <"\ttest_tick &&\n"> <"\tgit tag -a -m \"tip five\" five &&\n"> <"\tgit for-each-ref refs/heads/ refs/tags/ >expect &&\n"> <"\t(\n"> <"\t\tcd dst &&\n"> <"\t\tgit pull &&\n"> <"\t\tgit for-each-ref refs/heads/ refs/tags/ >../actual\n"> <"\t) &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"update backfilled tag">)} { (SQ <"\n"> <"\ttest_tick &&\n"> <"\tgit commit --allow-empty -m sixth &&\n"> <"\ttest_tick &&\n"> <"\tgit tag -a -m \"tip two\" two three^1 &&\n"> <"\tgit for-each-ref refs/heads/ refs/tags/ >expect &&\n"> <"\t(\n"> <"\t\tcd dst &&\n"> <"\t\tgit pull &&\n"> <"\t\tgit for-each-ref refs/heads/ refs/tags/ >../actual\n"> <"\t) &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"update backfilled tag without primary transfer">)} { (SQ <"\n"> <"\ttest_tick &&\n"> <"\tgit tag -a -m \"tip one \" one two^1 &&\n"> <"\tgit for-each-ref refs/heads/ refs/tags/ >expect &&\n"> <"\t(\n"> <"\t\tcd dst &&\n"> <"\t\tgit pull &&\n"> <"\t\tgit for-each-ref refs/heads/ refs/tags/ >../actual\n"> <"\t) &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"set up fake git-daemon">)} { (SQ <"\n"> <"\tmkdir remote &&\n"> <"\tgit init --bare remote/one.git &&\n"> <"\tmkdir remote/host &&\n"> <"\tgit init --bare remote/host/two.git &&\n"> <"\twrite_script fake-daemon <<-\\EOF &&\n"> <"\tgit daemon --inetd \\\n"> <"\t\t--informative-errors \\\n"> <"\t\t--export-all \\\n"> <"\t\t--base-path=\"$TRASH_DIRECTORY/remote\" \\\n"> <"\t\t--interpolated-path=\"$TRASH_DIRECTORY/remote/%H%D\" \\\n"> <"\t\t\"$TRASH_DIRECTORY/remote\"\n"> <"\tEOF\n"> <"\texport TRASH_DIRECTORY &&\n"> <"\tPATH=$TRASH_DIRECTORY:$PATH\n"> ) } ) (C {(test_expect_success)} {(SQ <"ext command can connect to git daemon (no vhost)">)} {(SQ <"\n"> <"\trm -rf dst &&\n"> <"\tgit clone \"ext::fake-daemon %G/one.git\" dst\n">)} ) (C {(test_expect_success)} {(SQ <"ext command can connect to git daemon (vhost)">)} { (SQ <"\n"> <"\trm -rf dst &&\n"> <"\tgit clone \"ext::fake-daemon %G/two.git %Vhost\" dst\n">) } ) (C {(test_done)}) ] )