(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 repository version check'>)}
        )
      ]
      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 <setup>)}
        {
          (SQ <'\n'> <'\tcat >test.patch <<-\\EOF &&\n'> <'\tdiff --git a/test.txt b/test.txt\n'> 
            <'\tnew file mode 100644\n'> <'\t--- /dev/null\n'> <'\t+++ b/test.txt\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+123\n'> <'\tEOF\n'> <'\n'> 
            <'\ttest_create_repo "test" &&\n'> <'\ttest_create_repo "test2" &&\n'> 
            <'\tgit config --file=test2/.git/config core.repositoryformatversion 99\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'gitdir selection on normal repos'>)}
        {
          (SQ <'\n'> <'\techo 0 >expect &&\n'> 
            <'\tgit config core.repositoryformatversion >actual &&\n'> <'\tgit -C test config core.repositoryformatversion >actual2 &&\n'> <'\ttest_cmp expect actual &&\n'> 
            <'\ttest_cmp expect actual2\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'gitdir selection on unsupported repo'>)}
        {
          (SQ <'\n'> <'\t# Make sure it would stop at test2, not trash\n'> 
            <'\ttest_expect_code 1 git -C test2 config core.repositoryformatversion >actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'gitdir not required mode'>)}
        {
          (SQ <'\n'> <'\tgit apply --stat test.patch &&\n'> 
            <'\tgit -C test apply --stat ../test.patch &&\n'> <'\tgit -C test2 apply --stat ../test.patch\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'gitdir required mode'>)}
        {
          (SQ <'\n'> <'\tgit apply --check --index test.patch &&\n'> 
            <'\tgit -C test apply --check --index ../test.patch &&\n'> <'\ttest_must_fail git -C test2 apply --check --index ../test.patch\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <check_allow>
      name: check_allow
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<rev-parse>} {<--git-dir>}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {<.git>}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<expect>} {<actual>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <check_abort>
      name: check_abort
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <test_must_fail>
              more_env: []
              words: [{<test_must_fail>} {<git>} {<rev-parse>} {<--git-dir>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <mkconfig>
      name: mkconfig
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(SQ <'[core]'>)}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ <'repositoryformatversion = '> ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <shift>
                  more_env: []
                  words: [{<shift>}]
                  redirects: []
                  do_fork: T
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <test>
                                  more_env: []
                                  words: [{<test>} {($ Id.VSub_Pound '#')} {<-gt>} {<0>}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {(SQ <'[extensions]'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ForEach
                              keyword: <Id.KW_For for>
                              iter_names: [i]
                              iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}])
                              semi_tok: <Id.Op_Semi _>
                              body: 
                                (command.DoGroup
                                  left: <Id.KW_Do do>
                                  children: [
                                    (command.Simple
                                      blame_tok: <echo>
                                      more_env: []
                                      words: [{<echo>} {(DQ ($ Id.VSub_DollarName i))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  right: <Id.KW_Done done>
                                )
                              redirects: []
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                      spids: [201 212]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <read>
                  more_env: []
                  words: [{<read>} {<outcome>} {<version>} {<extensions>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {
                  (DQ ($ Id.VSub_DollarName outcome) <' version='> ($ Id.VSub_DollarName version) <' '> 
                    ($ Id.VSub_DollarName extensions)
                  )
                }
                {
                  (DQ <'\n'> <'\t\tmkconfig '> ($ Id.VSub_DollarName version) <' '> 
                    ($ Id.VSub_DollarName extensions) <' >.git/config &&\n'> <'\t\tcheck_'> (${ Id.VSub_Name outcome) <'\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'allow 0\n'>
                <'allow 1\n'>
                <'allow 1 noop\n'>
                <'abort 1 no-such-extension\n'>
                <'allow 0 no-such-extension\n'>
              ]
            )
        )
      ]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'precious-objects allowed'>)}
        {(SQ <'\n'> <'\tmkconfig 1 preciousObjects >.git/config &&\n'> <'\tcheck_allow\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'precious-objects blocks destructive repack'>)}
        {(SQ <'\n'> <'\ttest_must_fail git repack -ad\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'other repacks are OK'>)}
        {(SQ <'\n'> <'\ttest_commit foo &&\n'> <'\tgit repack\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'precious-objects blocks prune'>)}
        {(SQ <'\n'> <'\ttest_must_fail git prune\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [{<test_expect_success>} {(SQ <'gc runs without complaint'>)} {(SQ <'\n'> <'\tgit gc\n'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)