(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 [] (AndOr OP_AND_IF (Com {[LIT_CHARS rm]} {[LIT_CHARS -fr]} {[LIT_CHARS testrepo]} ) (AndOr OP_AND_IF (Com {[LIT_CHARS mkdir]} {[LIT_CHARS testrepo]} ) (Subshell (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[LIT_CHARS testrepo]} ) (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 [] (AndOr OP_AND_IF (Com {[LIT_CHARS mk_empty]} ) (Subshell (AndOr OP_AND_IF (For ref [{[DQ [VarSub @]]}]) (AndOr OP_OR_IF (Com {[LIT_CHARS git]} {[LIT_CHARS push]} {[LIT_CHARS testrepo]} {[VarSub the_first_commit] [LIT_OTHER ":"] [LIT_CHARS refs/] [VarSub ref]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Oops, push refs/"][VarSub ref][LIT_CHARS " failure"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[LIT_CHARS testrepo]} ) (AndOr OP_AND_IF (For ref [{[DQ [VarSub @]]}]) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('r', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS show-ref]} {[LIT_CHARS -s]} {[LIT_CHARS --verify]} {[LIT_CHARS refs/] [VarSub ref]})]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[DQ [LIT_CHARS z][VarSub r]]} {[LIT_DBRACKET_LIKE "="]} {[DQ [LIT_CHARS z][VarSub the_first_commit]]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Oops, refs/"][VarSub ref][LIT_CHARS " is wrong"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (Com {[LIT_CHARS git]} {[LIT_CHARS fsck]} {[LIT_CHARS --full]} ) ) ) ) ) ) ) (FunctionDef mk_test_with_hooks [] (AndOr OP_AND_IF (Com {[LIT_CHARS mk_test]} {[DQ [VarSub @]]} ) (Subshell (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[LIT_CHARS testrepo]} ) (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 1]]} ) (Com {[LIT_CHARS git]} {[LIT_CHARS clone]} {[LIT_CHARS testrepo]} {[DQ [VarSub 1]]} ) ) ) (FunctionDef check_push_result [] (Subshell (List (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[LIT_CHARS testrepo]} ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('it', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS shift]} ) ) ) (AndOr OP_AND_IF (For ref [{[DQ [VarSub @]]}]) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('r', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS show-ref]} {[LIT_CHARS -s]} {[LIT_CHARS --verify]} {[LIT_CHARS refs/] [VarSub ref]})]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[DQ [LIT_CHARS z][VarSub r]]} {[LIT_DBRACKET_LIKE "="]} {[DQ [LIT_CHARS z][VarSub it]]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Oops, refs/"][VarSub ref][LIT_CHARS " is wrong"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (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 ]} ) (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 git]} {[LIT_CHARS config]} {[LIT_CHARS --remove-section]} {[LIT_CHARS remote.there]} ) (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS --remove-section]} {[LIT_CHARS branch.master]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS --remove-section]} {[LIT_CHARS remote.there]} ) (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"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ testrepo/.git/branches/branch2 &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/branches/branch1 &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ .git/branches/branch2 &&\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 .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"> ]} ) (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 ]} ) (Com {[LIT_CHARS test_done]} ) )