(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 <'.git file\n'> <'\n'> <'Verify that plumbing commands work when .git is a file\n'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <objpath>
      name: objpath
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <sed>
                  more_env: []
                  words: [{<sed>} {<-e>} {(SQ <'s|\\(..\\)|\\1/|'>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <objck>
      name: objck
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'p='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'p='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p='> name:p)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <objpath>
                            more_env: []
                            words: [{<objpath>} {(DQ ($ Id.VSub_Number 1))}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [
                            {<test>}
                            {<Id.KW_Bang '!'>}
                            {<-f>}
                            {(DQ ($ Id.VSub_DollarName REAL) <'/objects/'> ($ Id.VSub_DollarName p))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'Object not found: '> ($ Id.VSub_DollarName REAL) <'/objects/'> 
                            ($ Id.VSub_DollarName p)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <false>
                      more_env: []
                      words: [{<false>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [59 74]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'initial setup'>)}
        {(SQ <'\n'> <'\tREAL="$(pwd)/.real" &&\n'> <'\tmv .git "$REAL"\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'bad setup: invalid .git file format'>)}
        {
          (SQ <'\n'> <'\techo "gitdir $REAL" >.git &&\n'> <'\tif git rev-parse 2>.err\n'> <'\tthen\n'> 
            <'\t\techo "git rev-parse accepted an invalid .git file"\n'> <'\t\tfalse\n'> <'\tfi &&\n'> <'\tif ! grep "Invalid gitfile format" .err\n'> <'\tthen\n'> 
            <'\t\techo "git rev-parse returned wrong error"\n'> <'\t\tfalse\n'> <'\tfi\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'bad setup: invalid .git file path'>)}
        {
          (SQ <'\n'> <'\techo "gitdir: $REAL.not" >.git &&\n'> <'\tif git rev-parse 2>.err\n'> 
            <'\tthen\n'> <'\t\techo "git rev-parse accepted an invalid .git file path"\n'> <'\t\tfalse\n'> <'\tfi &&\n'> 
            <'\tif ! grep "Not a git repository" .err\n'> <'\tthen\n'> <'\t\techo "git rev-parse returned wrong error"\n'> <'\t\tfalse\n'> <'\tfi\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'final setup + check rev-parse --git-dir'>)}
        {
          (SQ <'\n'> <'\techo "gitdir: $REAL" >.git &&\n'> 
            <'\ttest "$REAL" = "$(git rev-parse --git-dir)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check hash-object'>)}
        {
          (SQ <'\n'> <'\techo "foo" >bar &&\n'> <'\tSHA=$(cat bar | git hash-object -w --stdin) &&\n'> 
            <'\tobjck $SHA\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check cat-file'>)}
        {(SQ <'\n'> <'\tgit cat-file blob $SHA >actual &&\n'> <'\ttest_cmp bar actual\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check update-index'>)}
        {
          (SQ <'\n'> <'\tif test -f "$REAL/index"\n'> <'\tthen\n'> 
            <'\t\techo "Hmm, $REAL/index exists?"\n'> <'\t\tfalse\n'> <'\tfi &&\n'> <'\trm -f "$REAL/objects/$(objpath $SHA)" &&\n'> 
            <'\tgit update-index --add bar &&\n'> <'\tif ! test -f "$REAL/index"\n'> <'\tthen\n'> <'\t\techo "$REAL/index not found"\n'> <'\t\tfalse\n'> 
            <'\tfi &&\n'> <'\tobjck $SHA\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check write-tree'>)}
        {(SQ <'\n'> <'\tSHA=$(git write-tree) &&\n'> <'\tobjck $SHA\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check commit-tree'>)}
        {(SQ <'\n'> <'\tSHA=$(echo "commit bar" | git commit-tree $SHA) &&\n'> <'\tobjck $SHA\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check rev-list'>)}
        {(SQ <'\n'> <'\techo $SHA >"$REAL/HEAD" &&\n'> <'\ttest "$SHA" = "$(git rev-list HEAD)"\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup_git_dir twice in subdir'>)}
        {
          (SQ <'\n'> <'\tgit init sgd &&\n'> <'\t(\n'> <'\t\tcd sgd &&\n'> 
            <'\t\tgit config alias.lsfi ls-files &&\n'> <'\t\tmv .git .realgit &&\n'> <'\t\techo "gitdir: .realgit" >.git &&\n'> <'\t\tmkdir subdir &&\n'> 
            <'\t\tcd subdir &&\n'> <'\t\t>foo &&\n'> <'\t\tgit add foo &&\n'> <'\t\tgit lsfi >actual &&\n'> <'\t\techo foo >expected &&\n'> 
            <'\t\ttest_cmp expected actual\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'enter_repo non-strict mode'>)}
        {
          (SQ <'\n'> <'\ttest_create_repo enter_repo &&\n'> <'\t(\n'> <'\t\tcd enter_repo &&\n'> 
            <'\t\ttest_tick &&\n'> <'\t\ttest_commit foo &&\n'> <'\t\tmv .git .realgit &&\n'> <'\t\techo "gitdir: .realgit" >.git\n'> 
            <'\t) &&\n'> <'\tgit ls-remote enter_repo >actual &&\n'> <'\tcat >expected <<-\\EOF &&\n'> 
            <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\tHEAD\n'> <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\trefs/heads/master\n'> 
            <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\trefs/tags/foo\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'enter_repo linked checkout'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd enter_repo &&\n'> 
            <'\t\tgit worktree add  ../foo refs/tags/foo\n'> <'\t) &&\n'> <'\tgit ls-remote foo >actual &&\n'> <'\tcat >expected <<-\\EOF &&\n'> 
            <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\tHEAD\n'> <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\trefs/heads/master\n'> 
            <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\trefs/tags/foo\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'enter_repo strict mode'>)}
        {
          (SQ <'\n'> 
            <'\tgit ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&\n'> <'\tcat >expected <<-\\EOF &&\n'> <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\tHEAD\n'> 
            <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\trefs/heads/master\n'> <'\t946e985ab20de757ca5b872b16d64e92ff3803a9\trefs/tags/foo\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)