(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_description='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_description='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'see how we handle various forms of corruption'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <obj_to_file>
      name: obj_to_file
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<rev-parse>} {<--git-dir>}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    ) <'/objects/'> 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Pipeline
                          children: [
                            (command.Simple
                              blame_tok: <git>
                              more_env: []
                              words: [{<git>} {<rev-parse>} {(DQ ($ Id.VSub_Number 1))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sed>
                              more_env: []
                              words: [{<sed>} {(SQ <'s,..,&/,'>)}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_Pipe _>]
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <corrupt_byte>
      name: corrupt_byte
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'obj_file='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'obj_file='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'obj_file='> name:obj_file)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <obj_to_file>
                                more_env: []
                                words: [{<obj_to_file>} {(DQ ($ Id.VSub_Number 1))}]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <chmod>
                  more_env: []
                  words: [{<chmod>} {<Id.Lit_Other '+'> <w>} {(DQ ($ Id.VSub_DollarName obj_file))}]
                  redirects: []
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [{<printf>} {(SQ <'\\0'>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <dd>
                      more_env: []
                      words: [
                        {<dd>}
                        {<Id.Lit_VarLike 'of='> (DQ ($ Id.VSub_DollarName obj_file))}
                        {<Id.Lit_VarLike 'bs='> <1>}
                        {<Id.Lit_VarLike 'seek='> (DQ ($ Id.VSub_Number 2))}
                        {<Id.Lit_VarLike 'conv='> <notrunc>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup corrupt repo'>)}
        {
          (SQ <'\n'> <'\tgit init bit-error &&\n'> <'\t(\n'> <'\t\tcd bit-error &&\n'> 
            <'\t\ttest_commit content &&\n'> <'\t\tcorrupt_byte HEAD:content.t 10\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup repo with missing object'>)}
        {
          (SQ <'\n'> <'\tgit init missing &&\n'> <'\t(\n'> <'\t\tcd missing &&\n'> 
            <'\t\ttest_commit content &&\n'> <'\t\trm -f "$(obj_to_file HEAD:content.t)"\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup repo with misnamed object'>)}
        {
          (SQ <'\n'> <'\tgit init misnamed &&\n'> <'\t(\n'> <'\t\tcd misnamed &&\n'> 
            <'\t\ttest_commit content &&\n'> <'\t\tgood=$(obj_to_file HEAD:content.t) &&\n'> 
            <'\t\tblob=$(echo corrupt | git hash-object -w --stdin) &&\n'> <'\t\tbad=$(obj_to_file $blob) &&\n'> <'\t\trm -f "$good" &&\n'> <'\t\tmv "$bad" "$good"\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'streaming a corrupt blob fails'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd bit-error &&\n'> 
            <'\t\ttest_must_fail git cat-file blob HEAD:content.t\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'read-tree -u detects bit-errors in blobs'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd bit-error &&\n'> <'\t\trm -f content.t &&\n'> 
            <'\t\ttest_must_fail git read-tree --reset -u HEAD\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'read-tree -u detects missing objects'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd missing &&\n'> <'\t\trm -f content.t &&\n'> 
            <'\t\ttest_must_fail git read-tree --reset -u HEAD\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'clone --no-local --bare detects corruption'>)}
        {(SQ <'\n'> <'\ttest_must_fail git clone --no-local --bare bit-error corrupt-transport\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'clone --no-local --bare detects missing object'>)}
        {(SQ <'\n'> <'\ttest_must_fail git clone --no-local --bare missing missing-transport\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'clone --no-local --bare detects misnamed object'>)}
        {(SQ <'\n'> <'\ttest_must_fail git clone --no-local --bare misnamed misnamed-transport\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'clone --local detects corruption'>)}
        {(SQ <'\n'> <'\ttest_must_fail git clone --local bit-error corrupt-checkout\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'error detected during checkout leaves repo intact'>)}
        {(SQ <'\n'> <'\ttest_path_is_dir corrupt-checkout/.git\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'clone --local detects missing objects'>)}
        {(SQ <'\n'> <'\ttest_must_fail git clone --local missing missing-checkout\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_failure>
      more_env: []
      words: [
        {<test_expect_failure>}
        {(SQ <'clone --local detects misnamed objects'>)}
        {(SQ <'\n'> <'\ttest_must_fail git clone --local misnamed misnamed-checkout\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)