(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 <'test custom script in place of pack-objects'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'create some history to fetch'>)}
        {(SQ <'\n'> <'\ttest_commit one &&\n'> <'\ttest_commit two\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'create debugging hook script'>)}
        {
          (SQ <'\n'> <'\twrite_script .git/hook <<-\\EOF\n'> <'\t\techo >&2 "hook running"\n'> 
            <'\t\techo "$*" >hook.args\n'> <'\t\tcat >hook.stdin\n'> <'\t\t"$@" <hook.stdin >hook.stdout\n'> <'\t\tcat hook.stdout\n'> <'\tEOF\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <clear_hook_results>
      name: clear_hook_results
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <rm>
              more_env: []
              words: [{<rm>} {<-rf>} {<'.git/hook.'> <Id.Lit_Star '*'>} {<dst.git>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'hook runs via global config'>)}
        {
          (SQ <'\n'> <'\tclear_hook_results &&\n'> 
            <'\ttest_config_global uploadpack.packObjectsHook ./hook &&\n'> <'\tgit clone --no-local . dst.git 2>stderr &&\n'> <'\tgrep "hook running" stderr\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'hook outputs are sane'>)}
        {
          (SQ <'\n'> <'\t# check that we recorded a usable pack\n'> 
            <'\tgit index-pack --stdin <.git/hook.stdout &&\n'> <'\n'> <'\t# check that we recorded args and stdin. We do not check\n'> 
            <'\t# the full argument list or the exact pack contents, as it would make\n'> <'\t# the test brittle. So just sanity check that we could replay\n'> <'\t# the packing procedure.\n'> 
            <'\tgrep "^git" .git/hook.args &&\n'> <'\t$(cat .git/hook.args) <.git/hook.stdin >replay\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'hook runs from -c config'>)}
        {
          (SQ <'\n'> <'\tclear_hook_results &&\n'> <'\tgit clone --no-local \\\n'> 
            <'\t  -u "git -c uploadpack.packObjectsHook=./hook upload-pack" \\\n'> <'\t  . dst.git 2>stderr &&\n'> <'\tgrep "hook running" stderr\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'hook does not run from repo config'>)}
        {
          (SQ <'\n'> <'\tclear_hook_results &&\n'> 
            <'\ttest_config uploadpack.packObjectsHook "./hook" &&\n'> <'\tgit clone --no-local . dst.git 2>stderr &&\n'> <'\t! grep "hook running" stderr &&\n'> 
            <'\ttest_path_is_missing .git/hook.args &&\n'> <'\ttest_path_is_missing .git/hook.stdin &&\n'> <'\ttest_path_is_missing .git/hook.stdout\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)