(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[12])
          op: Equal
          rhs: {(SQ <'Revision traversal vs grafts and path limiter'>)}
          spids: [12]
        )
      ]
      spids: [12]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <'\n'> <'\tmkdir subdir &&\n'> <'\techo >fileA fileA &&\n'> 
          <'\techo >subdir/fileB fileB &&\n'> <'\tgit add fileA subdir/fileB &&\n'> <'\tgit commit -a -m "Initial in one history." &&\n'> 
          <'\tA0=$(git rev-parse --verify HEAD) &&\n'> <'\n'> <'\techo >fileA fileA modified &&\n'> <'\tgit commit -a -m "Second in one history." &&\n'> 
          <'\tA1=$(git rev-parse --verify HEAD) &&\n'> <'\n'> <'\techo >subdir/fileB fileB modified &&\n'> <'\tgit commit -a -m "Third in one history." &&\n'> 
          <'\tA2=$(git rev-parse --verify HEAD) &&\n'> <'\n'> <'\trm -f .git/refs/heads/master .git/index &&\n'> <'\n'> <'\techo >fileA fileA again &&\n'> 
          <'\techo >subdir/fileB fileB again &&\n'> <'\tgit add fileA subdir/fileB &&\n'> <'\tgit commit -a -m "Initial in alternate history." &&\n'> 
          <'\tB0=$(git rev-parse --verify HEAD) &&\n'> <'\n'> <'\techo >fileA fileA modified in alternate history &&\n'> 
          <'\tgit commit -a -m "Second in alternate history." &&\n'> <'\tB1=$(git rev-parse --verify HEAD) &&\n'> <'\n'> 
          <'\techo >subdir/fileB fileB modified in alternate history &&\n'> <'\tgit commit -a -m "Third in alternate history." &&\n'> <'\tB2=$(git rev-parse --verify HEAD) &&\n'> 
          <'\t: done\n'>
        )
      }
    )
    (command.FuncDef
      name: check
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:type spids:[71])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [71]
                )
              ]
              spids: [71]
            )
            (C {(shift)})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:arg spids:[79])
                  op: Equal
                  rhs: (word.EmptyWord)
                  spids: [79]
                )
              ]
              spids: [79]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:which spids:[82])
                  op: Equal
                  rhs: {(arg)}
                  spids: [82]
                )
              ]
              spids: [82]
            )
            (C {(rm)} {(-f)} {(test.expect)})
            (command.ForEach
              iter_name: a
              do_arg_iter: T
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(DQ (z) ($ VSub_Name '$a'))} {(Lit_Other '=')} {(z--)})]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:which spids:[118])
                                  op: Equal
                                  rhs: {(expect)}
                                  spids: [118]
                                )
                              ]
                              spids: [118]
                            )
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:child spids:[122])
                                  op: Equal
                                  rhs: (word.EmptyWord)
                                  spids: [122]
                                )
                              ]
                              spids: [122]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Continue continue>
                            )
                          ]
                          spids: [16777215 115]
                        )
                      ]
                      spids: [16777215 128]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(DQ ($ VSub_Name '$which'))} {(Lit_Other '=')} {(arg)})]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:arg spids:[147])
                                  op: Equal
                                  rhs: {(DQ ($ VSub_Name '$arg') ($ VSub_Name '$a') (' '))}
                                  spids: [147]
                                )
                              ]
                              spids: [147]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Continue continue>
                            )
                          ]
                          spids: [16777215 144]
                        )
                      ]
                      spids: [16777215 158]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(DQ ($ VSub_Name '$type'))} {(Lit_Other '=')} {(basic)})]
                          action: [(C {(echo)} {(DQ ($ VSub_Name '$a'))})]
                          spids: [16777215 174]
                        )
                      ]
                      else_action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (C {(test)} {(DQ (z) ($ VSub_Name '$child'))} 
                                  {(KW_Bang '!') (Lit_Other '=')} {(z)}
                                )
                              ]
                              action: [
                                (C {(echo)} {(DQ ($ VSub_Name '$child') (' ') ($ VSub_Name '$a'))})
                              ]
                              spids: [16777215 202]
                            )
                          ]
                          spids: [16777215 214]
                        )
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:child spids:[217])
                              op: Equal
                              rhs: {(DQ ($ VSub_Name '$a'))}
                              spids: [217]
                            )
                          ]
                          spids: [217]
                        )
                      ]
                      spids: [184 223]
                    )
                  ]
                  spids: [98 226]
                )
              redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test.expect)})]
              spids: [16777215 16777215]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(DQ ($ VSub_Name '$type'))} {(KW_Bang '!') (Lit_Other '=')} 
                          {(basic)}
                        )
                        (C {(test)} {(DQ (z) ($ VSub_Name '$child'))} {(KW_Bang '!') (Lit_Other '=')} 
                          {(z)}
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [{(echo)} {($ VSub_Name '$child')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(test.expect)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 260]
                )
              ]
              spids: [16777215 271]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$type')} {(Lit_Other '=')} {(basic)})]
                  action: [
                    (command.SimpleCommand
                      words: [{(git)} {(rev-list)} {($ VSub_Name '$arg')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(test.actual)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 285]
                )
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$type')} {(Lit_Other '=')} {(parents)})]
                  action: [
                    (command.SimpleCommand
                      words: [{(git)} {(rev-list)} {(--parents)} {($ VSub_Name '$arg')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(test.actual)}
                        )
                      ]
                    )
                  ]
                  spids: [298 309]
                )
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$type')} {(Lit_Other '=')} {(parents-raw)})]
                  action: [
                    (command.Pipeline
                      children: [
                        (C {(git)} {(rev-list)} {(--parents)} {(--pretty) (Lit_Other '=') (raw)} 
                          {($ VSub_Name '$arg')}
                        )
                        (command.SimpleCommand
                          words: [{(sed)} {(-n)} {(-e)} {(SQ <'s/^commit //p'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(test.actual)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                  spids: [324 335]
                )
              ]
              spids: [16777215 367]
            )
            (C {(test_cmp)} {(test.expect)} {(test.actual)})
          ]
          spids: [68]
        )
      spids: [63 67]
    )
    (command.ForEach
      iter_name: type
      iter_words: [{(basic)} {(parents)} {(parents-raw)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} {(SQ <'without grafts'>)} 
              {
                (DQ ('\n') ('\t\trm -f .git/info/grafts &&\n') ('\t\tcheck ') ($ VSub_Name '$type') (' ') 
                  ($ VSub_Name '$B2') (' -- ') ($ VSub_Name '$B2') (' ') ($ VSub_Name '$B1') (' ') ($ VSub_Name '$B0') ('\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} {(SQ <'with grafts'>)} 
              {
                (DQ ('\n') ("\t\techo '") ($ VSub_Name '$B0') (' ') ($ VSub_Name '$A2') 
                  ("' >.git/info/grafts &&\n") ('\t\tcheck ') ($ VSub_Name '$type') (' ') ($ VSub_Name '$B2') (' -- ') ($ VSub_Name '$B2') (' ') 
                  ($ VSub_Name '$B1') (' ') ($ VSub_Name '$B0') (' ') ($ VSub_Name '$A2') (' ') ($ VSub_Name '$A1') (' ') ($ VSub_Name '$A0') 
                  ('\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} {(SQ <'without grafts, with pathlimit'>)} 
              {
                (DQ ('\n') ('\t\trm -f .git/info/grafts &&\n') ('\t\tcheck ') ($ VSub_Name '$type') (' ') 
                  ($ VSub_Name '$B2') (' subdir -- ') ($ VSub_Name '$B2') (' ') ($ VSub_Name '$B0') ('\n') ('\t')
                )
              }
            )
            (C {(test_expect_success)} {(SQ <'with grafts, with pathlimit'>)} 
              {
                (DQ ('\n') ("\t\techo '") ($ VSub_Name '$B0') (' ') ($ VSub_Name '$A2') 
                  ("' >.git/info/grafts &&\n") ('\t\tcheck ') ($ VSub_Name '$type') (' ') ($ VSub_Name '$B2') (' subdir -- ') ($ VSub_Name '$B2') (' ') 
                  ($ VSub_Name '$B0') (' ') ($ VSub_Name '$A2') (' ') ($ VSub_Name '$A0') ('\n') ('\t')
                )
              }
            )
          ]
          spids: [391 507]
        )
      spids: [384 16777215]
    )
    (C {(test_done)})
  ]
)