(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]}) (= scope= flags=0 words=[] bindings=[('D', {[ComSub (Com {[LIT_CHARS pwd]})]})]) (FunctionDef mk_empty [] (List (= scope= flags=0 words=[] bindings=[('repo_name', {[DQ [VarSub 1]]})]) (AndOr OP_AND_IF (Com {[LIT_CHARS rm]} {[LIT_CHARS -fr]} {[DQ [VarSub repo_name]]}) (AndOr OP_AND_IF (Com {[LIT_CHARS mkdir]} {[DQ [VarSub repo_name]]}) (Subshell (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [VarSub repo_name]]}) (AndOr OP_AND_IF (Com {[LIT_CHARS git]} {[LIT_CHARS init]}) (AndOr OP_AND_IF (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS receive.denyCurrentBranch]} {[LIT_CHARS warn]}) (Com {[LIT_CHARS mv]} {[LIT_CHARS .git/hooks]} {[LIT_CHARS .git/hooks-disabled]}) ) ) ) ) ) ) ) ) (FunctionDef mk_test [] (List (= scope= flags=0 words=[] bindings=[('repo_name', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS shift]}) (AndOr OP_AND_IF (Com {[LIT_CHARS mk_empty]} {[DQ [VarSub repo_name]]}) (Subshell (AndOr OP_AND_IF (For ref [{[DQ [VarSub @]]}]) (AndOr OP_OR_IF (Com {[LIT_CHARS git]} {[LIT_CHARS push]} {[DQ [VarSub repo_name]]} {[VarSub the_first_commit] [LIT_OTHER ":"] [LIT_CHARS refs/] [VarSub ref]}) (Com {[LIT_CHARS exit]}) ) ) (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [VarSub repo_name]]}) (AndOr OP_AND_IF (For ref [{[DQ [VarSub @]]}]) (AndOr OP_AND_IF (Com {[LIT_CHARS echo]} {[DQ [VarSub the_first_commit]]} < (FilenameRedirectNode filename={[LIT_CHARS expect]} "> 1), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS git]} {[LIT_CHARS show-ref]} {[LIT_CHARS -s]} {[LIT_CHARS --verify]} {[LIT_CHARS refs/] [VarSub ref]} < (FilenameRedirectNode filename={[LIT_CHARS actual]} "> 1), > ) (AndOr OP_OR_IF (Com {[LIT_CHARS test_cmp]} {[LIT_CHARS expect]} {[LIT_CHARS actual]}) (Com {[LIT_CHARS exit]}) ) ) ) ) (Com {[LIT_CHARS git]} {[LIT_CHARS fsck]} {[LIT_CHARS --full]}) ) ) ) ) ) ) ) (FunctionDef mk_test_with_hooks [] (List (= scope= flags=0 words=[] bindings=[('repo_name', {[VarSub 1]})]) (AndOr OP_AND_IF (Com {[LIT_CHARS mk_test]} {[DQ [VarSub @]]}) (Subshell (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [VarSub repo_name]]}) (AndOr OP_AND_IF (Com {[LIT_CHARS mkdir]} {[LIT_CHARS .git/hooks]}) (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[LIT_CHARS .git/hooks]}) (AndOr OP_AND_IF (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS pre-receive]} "> 1), (HereDocRedirectNode here_end='EOF' do_expansion=False body_word={[LIT_CHARS "#!/bin/sh\n"] [LIT_CHARS "cat - >>pre-receive.actual\n"]} 0), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS update]} "> 1), (HereDocRedirectNode here_end='EOF' do_expansion=False body_word={[LIT_CHARS "#!/bin/sh\n"] [LIT_CHARS "printf \"%s %s %s\\n\" \"$@\" >>update.actual\n"]} 0), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS post-receive]} "> 1), (HereDocRedirectNode here_end='EOF' do_expansion=False body_word={[LIT_CHARS "#!/bin/sh\n"] [LIT_CHARS "cat - >>post-receive.actual\n"]} 0), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS post-update]} "> 1), (HereDocRedirectNode here_end='EOF' do_expansion=False body_word={[LIT_CHARS "#!/bin/sh\n"] [LIT_CHARS "for ref in \"$@\"\n"] [LIT_CHARS "do\n"] [LIT_CHARS "printf \"%s\\n\" \"$ref\" >>post-update.actual\n"] [LIT_CHARS "done\n"]} 0), > ) (Com {[LIT_CHARS chmod]} {[LIT_OTHER "+"] [LIT_CHARS x]} {[LIT_CHARS pre-receive]} {[LIT_CHARS update]} {[LIT_CHARS post-receive]} {[LIT_CHARS post-update]}) ) ) ) ) ) ) ) ) ) ) ) (FunctionDef mk_child [] (AndOr OP_AND_IF (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub 2]]}) (Com {[LIT_CHARS git]} {[LIT_CHARS clone]} {[DQ [VarSub 1]]} {[DQ [VarSub 2]]}) ) ) (FunctionDef check_push_result [] (List (= scope= flags=0 words=[] bindings=[('repo_name', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS shift]}) (Subshell (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [VarSub repo_name]]}) (AndOr OP_AND_IF (Com {[LIT_CHARS echo]} {[DQ [VarSub 1]]} < (FilenameRedirectNode filename={[LIT_CHARS expect]} "> 1), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS shift]}) (AndOr OP_AND_IF (For ref [{[DQ [VarSub @]]}]) (AndOr OP_AND_IF (Com {[LIT_CHARS git]} {[LIT_CHARS show-ref]} {[LIT_CHARS -s]} {[LIT_CHARS --verify]} {[LIT_CHARS refs/] [VarSub ref]} < (FilenameRedirectNode filename={[LIT_CHARS actual]} "> 1), > ) (AndOr OP_OR_IF (Com {[LIT_CHARS test_cmp]} {[LIT_CHARS expect]} {[LIT_CHARS actual]}) (Com {[LIT_CHARS exit]}) ) ) ) (Com {[LIT_CHARS git]} {[LIT_CHARS fsck]} {[LIT_CHARS --full]}) ) ) ) ) ) ) ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS setup]} {[SQ path1 &&\n"> path2 &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ testrepo/.git/hooks/pre-receive &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ pre-receive.expect <<-EOF &&\n"> update.expect <<-EOF &&\n"> post-receive.expect <<-EOF &&\n"> post-update.expect <<-EOF &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ pre-receive.expect <<-EOF &&\n"> update.expect <<-EOF &&\n"> post-receive.expect <<-EOF &&\n"> post-update.expect <<-EOF &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ pre-receive.expect <<-EOF &&\n"> update.expect <<-EOF &&\n"> post-receive.expect <<-EOF &&\n"> post-update.expect <<-EOF &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ pre-receive.expect <<-EOF &&\n"> update.expect <<-EOF &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ pre-receive.expect <<-EOF &&\n"> update.expect <<-EOF &&\n"> post-receive.expect <<-EOF &&\n"> post-update.expect <<-EOF &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ stderr &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ stderr &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ stderr &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ testrepo/.git/branches/branch1 &&\n"> expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ testrepo/.git/branches/branch2 &&\n"> expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/branches/branch1 &&\n"> expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/branches/branch2 &&\n"> expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ path2 &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ path2 &&\n"> path3 &&\n"> stderr &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ file1 &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/foo \"To testrepo\" &&\n"> >.git/foo \"*\trefs/heads/master:refs/remotes/origin/master\t[new branch]\" &&\n"> >.git/foo \"Done\" &&\n"> .git/bar --porcelain testrepo refs/heads/master:refs/remotes/origin/master &&\n"> expect &&\n"> actual &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/foo \"To testrepo\" &&\n"> >.git/foo \"!\trefs/heads/master:refs/heads/master\t[remote rejected] (branch is currently checked out)\" &&\n"> .git/bar --porcelain testrepo refs/heads/master:refs/heads/master &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/foo \"To testrepo\" &&\n"> >.git/foo \"!\trefs/heads/master^:refs/heads/master\t[rejected] (non-fast-forward)\" &&\n"> >.git/foo \"Done\" &&\n"> .git/bar --porcelain --dry-run testrepo refs/heads/master^:refs/heads/master &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (For configsection [{[LIT_CHARS transfer]}, {[LIT_CHARS receive]}]) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "push to update a ref hidden by "][VarSub configsection][LIT_CHARS .hiderefs]]} {[SQ