(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'Revision traversal vs grafts and path limiter'>)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (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'>
        )
      }
    )
    (FuncDef
      name: check
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:type)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [63]
                )
              ]
              spids: [63]
            )
            (C {(shift)})
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:arg) op:Equal rhs:{(EmptyPart)} spids:[71])]
              spids: [71]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:which) op:Equal rhs:{(arg)} spids:[74])]
              spids: [74]
            )
            (C {(rm)} {(-f)} {(test.expect)})
            (ForEach
              iter_name: a
              do_arg_iter: T
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(DQ (z) ($ VSub_Name '$a'))} {(Lit_Other '=')} {(z--)})]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:which)
                                  op: Equal
                                  rhs: {(expect)}
                                  spids: [110]
                                )
                              ]
                              spids: [110]
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:child)
                                  op: Equal
                                  rhs: {(EmptyPart)}
                                  spids: [114]
                                )
                              ]
                              spids: [114]
                            )
                            (ControlFlow
                              token: <ControlFlow_Continue continue>
                            )
                          ]
                          spids: [16777215 107]
                        )
                      ]
                      spids: [16777215 120]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(DQ ($ VSub_Name '$which'))} {(Lit_Other '=')} {(arg)})]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:arg)
                                  op: Equal
                                  rhs: {(DQ ($ VSub_Name '$arg') ($ VSub_Name '$a') (' '))}
                                  spids: [139]
                                )
                              ]
                              spids: [139]
                            )
                            (ControlFlow
                              token: <ControlFlow_Continue continue>
                            )
                          ]
                          spids: [16777215 136]
                        )
                      ]
                      spids: [16777215 150]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(DQ ($ VSub_Name '$type'))} {(Lit_Other '=')} {(basic)})]
                          action: [(C {(echo)} {(DQ ($ VSub_Name '$a'))})]
                          spids: [16777215 166]
                        )
                      ]
                      else_action: [
                        (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 194]
                            )
                          ]
                          spids: [16777215 206]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:child)
                              op: Equal
                              rhs: {(DQ ($ VSub_Name '$a'))}
                              spids: [209]
                            )
                          ]
                          spids: [209]
                        )
                      ]
                      spids: [176 215]
                    )
                  ]
                  spids: [90 218]
                )
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(test.expect)} spids:[220])]
              spids: [16777215 16777215]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (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: [
                    (SimpleCommand
                      words: [{(echo)} {($ VSub_Name '$child')}]
                      redirects: [
                        (Redir
                          op_id: Redir_DGreat
                          fd: 16777215
                          arg_word: {(test.expect)}
                          spids: [257]
                        )
                      ]
                    )
                  ]
                  spids: [16777215 252]
                )
              ]
              spids: [16777215 263]
            )
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$type')} {(Lit_Other '=')} {(basic)})]
                  action: [
                    (SimpleCommand
                      words: [{(git)} {(rev-list)} {($ VSub_Name '$arg')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(test.actual)}
                          spids: [286]
                        )
                      ]
                    )
                  ]
                  spids: [16777215 277]
                )
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$type')} {(Lit_Other '=')} {(parents)})]
                  action: [
                    (SimpleCommand
                      words: [{(git)} {(rev-list)} {(--parents)} {($ VSub_Name '$arg')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(test.actual)}
                          spids: [312]
                        )
                      ]
                    )
                  ]
                  spids: [290 301]
                )
                (if_arm
                  cond: [(C {(test)} {($ VSub_Name '$type')} {(Lit_Other '=')} {(parents-raw)})]
                  action: [
                    (Pipeline
                      children: [
                        (C {(git)} {(rev-list)} {(--parents)} {(--pretty) (Lit_Other '=') (raw)} 
                          {($ VSub_Name '$arg')}
                        )
                        (SimpleCommand
                          words: [{(sed)} {(-n)} {(-e)} {(SQ <'s/^commit //p'>)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(test.actual)}
                              spids: [355]
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                  spids: [316 327]
                )
              ]
              spids: [16777215 359]
            )
            (C {(test_cmp)} {(test.expect)} {(test.actual)})
          ]
          spids: [60]
        )
      spids: [55 59]
    )
    (ForEach
      iter_name: type
      iter_words: [{(basic)} {(parents)} {(parents-raw)}]
      do_arg_iter: F
      body: 
        (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: [383 499]
        )
      spids: [376 16777215]
    )
    (C {(test_done)})
  ]
)