(command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$TEST_SRCDIR'))} {<Id.Lit_RBracket ']'>} ) (BraceGroup children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'TEST_SRCDIR not set!'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<source>} {(DQ (${ Id.VSub_Name TEST_SRCDIR) <'/io_bazel/src/test/shell/unittest.bash'>)}) (BraceGroup children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'Failed to source unittest.bash'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) terminator: <Id.Op_Semi _> ) ] ) ] ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name MASTER_COMMIT> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<7d41d7417fc34f7fa8aac7130a0588b8557e4b57>} ) ) } ) (command.ShFunction name: setup_git_repository body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'origin_git_root='> (${ Id.VSub_Name TEST_SRCDIR) <'/io_bazel'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MASTER_ROOT) op: assign_op.Equal rhs: {(${ Id.VSub_Name TEST_TMPDIR) <'/git/root'>} spids: [157] ) ] ) (C {<local>} {<Id.Lit_VarLike 'orig_dir='> (${ Id.VSub_Name PWD)}) (C {<mkdir>} {<-p>} {(${ Id.VSub_Name MASTER_ROOT)}) (C {<cd>} {(${ Id.VSub_Name MASTER_ROOT)}) (C {<cp>} {<-RL>} {(${ Id.VSub_Name origin_git_root) <'/.git'>} {<.git>}) (C {<rm>} {<-f>} {<'.git/hooks/'> <Id.Lit_Star '*'>}) (C {<git>} {<reset>} {<-q>} {<--hard>} {<HEAD>}) (C {<git>} {<checkout>} {<-q>} {<-B>} {<master>} {(${ Id.VSub_Name MASTER_COMMIT)}) (C {<cd>} {(${ Id.VSub_Name orig_dir)}) ] ) ) ] )