(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 <'selecting remote repo in ambiguous cases'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <reset>
      name: reset
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <rm>
              more_env: []
              words: [{<rm>} {<-rf>} {<foo>} {<foo.git>} {<fetch>} {<clone>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <make_tree>
      name: make_tree
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<init>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {(DQ ($ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <test_commit>
                          more_env: []
                          words: [{<test_commit>} {(DQ ($ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <make_bare>
      name: make_bare
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<init>} {<--bare>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {(DQ ($ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'tree='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'tree='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tree='> name:tree)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (CommandSub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (command.Simple
                                        blame_tok: <git>
                                        more_env: []
                                        words: [
                                          {<git>}
                                          {<hash-object>}
                                          {<-w>}
                                          {<-t>}
                                          {<tree>}
                                          {<'/dev/null'>}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                    right: <Id.Eof_RParen _>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'commit='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'commit='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'commit='> name:commit)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (CommandSub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (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: <git>
                                            more_env: []
                                            words: [
                                              {<git>}
                                              {<commit-tree>}
                                              {($ Id.VSub_DollarName tree)}
                                            ]
                                            redirects: []
                                            do_fork: T
                                          )
                                        ]
                                        ops: [<Id.Op_Pipe _>]
                                      )
                                    right: <Id.Eof_RParen _>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<update-ref>} {<HEAD>} {($ Id.VSub_DollarName commit)}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <get>
      name: get
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<init>} {<--bare>} {<fetch>}]
                  redirects: []
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {<fetch>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<fetch>} {(DQ <'../'> ($ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<clone>} {(DQ ($ Id.VSub_Number 1))} {<clone>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <check>
      name: check
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})]
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {<fetch>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<log>}
                            {<-1>}
                            {<--format> <Id.Lit_Equals '='> <Id.Lit_Other '%'> <s>}
                            {<FETCH_HEAD>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<actual.fetch>}
                    )
                  ]
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {<clone>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<log>}
                            {<-1>}
                            {<--format> <Id.Lit_Equals '='> <Id.Lit_Other '%'> <s>}
                            {<HEAD>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<actual.clone>}
                    )
                  ]
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<expect>} {<actual.fetch>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<expect>} {<actual.clone>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <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 <'find .git dir in worktree'>)}
        {(SQ <'\n'> <'\treset &&\n'> <'\tmake_tree foo &&\n'> <'\tget foo &&\n'> <'\tcheck foo\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'automagically add .git suffix'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_bare foo.git &&\n'> <'\tget foo &&\n'> 
            <'\tcheck foo.git\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'automagically add .git suffix to worktree'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_tree foo.git &&\n'> <'\tget foo &&\n'> 
            <'\tcheck foo.git\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'prefer worktree foo over bare foo.git'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_tree foo &&\n'> <'\tmake_bare foo.git &&\n'> 
            <'\tget foo &&\n'> <'\tcheck foo\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'prefer bare foo over bare foo.git'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_bare foo &&\n'> <'\tmake_bare foo.git &&\n'> 
            <'\tget foo &&\n'> <'\tcheck foo\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'disambiguate with full foo.git'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_bare foo &&\n'> <'\tmake_bare foo.git &&\n'> 
            <'\tget foo.git &&\n'> <'\tcheck foo.git\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'we are not fooled by non-git foo directory'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_bare foo.git &&\n'> <'\tmkdir foo &&\n'> 
            <'\tget foo &&\n'> <'\tcheck foo.git\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'prefer inner .git over outer bare'>)}
        {
          (SQ <'\n'> <'\treset &&\n'> <'\tmake_tree foo &&\n'> <'\tmake_bare foo.git &&\n'> 
            <'\tmv foo/.git foo.git &&\n'> <'\tget foo.git &&\n'> <'\tcheck foo\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)