(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 commit notes index (expensive!)'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <create_repo>
      name: create_repo
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'number_of_commits='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'number_of_commits='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'number_of_commits='>
                      name: number_of_commits
                    )
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'nr='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'nr='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nr='> name:nr)
                  op: assign_op.Equal
                  rhs: {<0>}
                )
              ]
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {<-d>} {<.git>}]
                  redirects: []
                  do_fork: T
                )
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<init>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Pipeline
                          children: [
                            (command.Subshell
                              left: <Id.Op_LParen _>
                              child: 
                                (command.AndOr
                                  children: [
                                    (command.WhileUntil
                                      keyword: <Id.KW_While while>
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Simple
                                              blame_tok: <test>
                                              more_env: []
                                              words: [
                                                {<test>}
                                                {($ Id.VSub_DollarName nr)}
                                                {<-lt>}
                                                {($ Id.VSub_DollarName number_of_commits)}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                        )
                                      body: 
                                        (command.DoGroup
                                          left: <Id.KW_Do do>
                                          children: [
                                            (command.ShAssignment
                                              left: <Id.Lit_VarLike 'nr='>
                                              pairs: [
                                                (AssignPair
                                                  left: <Id.Lit_VarLike 'nr='>
                                                  lhs: 
                                                    (sh_lhs_expr.Name
                                                      left: <Id.Lit_VarLike 'nr='>
                                                      name: nr
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (word_part.ArithSub
                                                        left: <Id.Left_DollarDParen '$(('>
                                                        anode: 
                                                          (arith_expr.Binary
                                                            op_id: Id.Arith_Plus
                                                            left: {($ Id.VSub_DollarName nr)}
                                                            right: {<Id.Lit_Digits 1>}
                                                          )
                                                        right: <Id.Right_DollarDParen _>
                                                      )
                                                    }
                                                )
                                              ]
                                              redirects: []
                                            )
                                            (command.ShAssignment
                                              left: <Id.Lit_VarLike 'mark='>
                                              pairs: [
                                                (AssignPair
                                                  left: <Id.Lit_VarLike 'mark='>
                                                  lhs: 
                                                    (sh_lhs_expr.Name
                                                      left: <Id.Lit_VarLike 'mark='>
                                                      name: mark
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (word_part.ArithSub
                                                        left: <Id.Left_DollarDParen '$(('>
                                                        anode: 
                                                          (arith_expr.Binary
                                                            op_id: Id.Arith_Plus
                                                            left: {($ Id.VSub_DollarName nr)}
                                                            right: {($ Id.VSub_DollarName nr)}
                                                          )
                                                        right: <Id.Right_DollarDParen _>
                                                      )
                                                    }
                                                )
                                              ]
                                              redirects: []
                                            )
                                            (command.ShAssignment
                                              left: <Id.Lit_VarLike 'notemark='>
                                              pairs: [
                                                (AssignPair
                                                  left: <Id.Lit_VarLike 'notemark='>
                                                  lhs: 
                                                    (sh_lhs_expr.Name
                                                      left: <Id.Lit_VarLike 'notemark='>
                                                      name: notemark
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (word_part.ArithSub
                                                        left: <Id.Left_DollarDParen '$(('>
                                                        anode: 
                                                          (arith_expr.Binary
                                                            op_id: Id.Arith_Plus
                                                            left: {($ Id.VSub_DollarName mark)}
                                                            right: {<Id.Lit_Digits 1>}
                                                          )
                                                        right: <Id.Right_DollarDParen _>
                                                      )
                                                    }
                                                )
                                              ]
                                              redirects: []
                                            )
                                            (command.AndOr
                                              children: [
                                                (command.Simple
                                                  blame_tok: <test_tick>
                                                  more_env: []
                                                  words: [{<test_tick>}]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                                (command.Simple
                                                  blame_tok: <cat>
                                                  more_env: []
                                                  words: [{<cat>}]
                                                  redirects: [
                                                    (Redir
                                                      op: <Id.Redir_DLessDash '<<-'>
                                                      loc: (redir_loc.Fd fd:0)
                                                      arg: 
                                                        (redir_param.HereDoc
                                                          here_begin: {<INPUT_END>}
                                                          here_end_tok: <Id.Undefined_Tok ''>
                                                          stdin_parts: [
                                                            <'commit refs/heads/master\n'>
                                                            <'mark :'>
                                                            ($ Id.VSub_DollarName mark)
                                                            <'\n'>
                                                            <'committer '>
                                                            ($ Id.VSub_DollarName GIT_COMMITTER_NAME)
                                                            <' <'>
                                                            ($ Id.VSub_DollarName GIT_COMMITTER_EMAIL)
                                                            <'> '>
                                                            ($ Id.VSub_DollarName GIT_COMMITTER_DATE)
                                                            <'\n'>
                                                            <'data <<COMMIT\n'>
                                                            <'commit #'>
                                                            ($ Id.VSub_DollarName nr)
                                                            <'\n'>
                                                            <'COMMIT\n'>
                                                            <'\n'>
                                                            <'M 644 inline file\n'>
                                                            <'data <<EOF\n'>
                                                            <'file in commit #'>
                                                            ($ Id.VSub_DollarName nr)
                                                            <'\n'>
                                                            <'EOF\n'>
                                                            <'\n'>
                                                            <'blob\n'>
                                                            <'mark :'>
                                                            ($ Id.VSub_DollarName notemark)
                                                            <'\n'>
                                                            <'data <<EOF\n'>
                                                            <'note for commit #'>
                                                            ($ Id.VSub_DollarName nr)
                                                            <'\n'>
                                                            <'EOF\n'>
                                                            <'\n'>
                                                          ]
                                                        )
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                                (command.Simple
                                                  blame_tok: <echo>
                                                  more_env: []
                                                  words: [
                                                    {<echo>}
                                                    {
                                                      (DQ <'N :'> ($ Id.VSub_DollarName notemark) 
                                                        <' :'> ($ Id.VSub_DollarName mark)
                                                      )
                                                    }
                                                  ]
                                                  redirects: [
                                                    (Redir
                                                      op: <Id.Redir_DGreat '>>'>
                                                      loc: (redir_loc.Fd fd:1)
                                                      arg: {<note_commit>}
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                              ]
                                              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                                            )
                                          ]
                                          right: <Id.KW_Done done>
                                        )
                                      redirects: []
                                    )
                                    (command.Simple
                                      blame_tok: <test_tick>
                                      more_env: []
                                      words: [{<test_tick>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <cat>
                                      more_env: []
                                      words: [{<cat>}]
                                      redirects: [
                                        (Redir
                                          op: <Id.Redir_DLessDash '<<-'>
                                          loc: (redir_loc.Fd fd:0)
                                          arg: 
                                            (redir_param.HereDoc
                                              here_begin: {<INPUT_END>}
                                              here_end_tok: <Id.Undefined_Tok ''>
                                              stdin_parts: [
                                                <'commit refs/notes/commits\n'>
                                                <'committer '>
                                                ($ Id.VSub_DollarName GIT_COMMITTER_NAME)
                                                <' <'>
                                                ($ Id.VSub_DollarName GIT_COMMITTER_EMAIL)
                                                <'> '>
                                                ($ Id.VSub_DollarName GIT_COMMITTER_DATE)
                                                <'\n'>
                                                <'data <<COMMIT\n'>
                                                <'notes\n'>
                                                <'COMMIT\n'>
                                                <'\n'>
                                              ]
                                            )
                                        )
                                      ]
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <cat>
                                      more_env: []
                                      words: [{<cat>} {<note_commit>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
                                )
                              right: <Id.Right_Subshell _>
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <git>
                              more_env: []
                              words: [{<git>} {<fast-import>} {<--quiet>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_Pipe _>]
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<config>} {<core.notesRef>} {<'refs/notes/commits'>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <test_notes>
      name: test_notes
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'count='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'count='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number 1)}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<config>} {<core.notesRef>} {<'refs/notes/commits'>}]
                  redirects: []
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<log>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <grep>
                      more_env: []
                      words: [{<grep>} {(DQ <'^    '>)}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<output>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'i='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'i='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_DollarName count)}
                    )
                  ]
                  redirects: []
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [{<test>} {($ Id.VSub_DollarName i)} {<-gt>} {<0>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {(DQ <'    commit #'> ($ Id.VSub_DollarName i))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {(DQ <'    note for commit #'> ($ Id.VSub_DollarName i))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'i='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'i='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        left: <Id.Left_DollarDParen '$(('>
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Minus
                                            left: {($ Id.VSub_DollarName i)}
                                            right: {<Id.Lit_Digits 1>}
                                          )
                                        right: <Id.Right_DollarDParen _>
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})]
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<expect>} {<output>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <write_script>
      more_env: []
      words: [{<write_script>} {<time_notes>}]
      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: [
                <'\tmode=$1\n'>
                <'\ti=1\n'>
                <'\twhile test $i -lt $2\n'>
                <'\tdo\n'>
                <'\t\tcase $1 in\n'>
                <'\t\tno-notes)\n'>
                <'\t\t\tGIT_NOTES_REF=non-existing\n'>
                <'\t\t\texport GIT_NOTES_REF\n'>
                <'\t\t\t;;\n'>
                <'\t\tnotes)\n'>
                <'\t\t\tunset GIT_NOTES_REF\n'>
                <'\t\t\t;;\n'>
                <'\t\tesac\n'>
                <'\t\tgit log\n'>
                <'\t\ti=$(($i+1))\n'>
                <'\tdone >/dev/null\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.ShFunction
      name_tok: <time_notes>
      name: time_notes
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [mode]
              iterable: (for_iter.Words words:[{<no-notes>} {<notes>}])
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {($ Id.VSub_DollarName mode)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <'/usr/bin/time'>
                      more_env: []
                      words: [
                        {<'/usr/bin/time'>}
                        {<'../time_notes'>}
                        {($ Id.VSub_DollarName mode)}
                        {($ Id.VSub_Number 1)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <do_tests>
      name: do_tests
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'count='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'count='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
                (AssignPair
                  left: <Id.Lit_VarLike 'pr='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pr='> name:pr)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 2>
                        var_name: 2
                        suffix_op: (suffix_op.Unary op:<Id.VTest_Hyphen _> arg_word:{})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {($ Id.VSub_DollarName pr)}
                {(DQ <'setup '> ($ Id.VSub_DollarName count))}
                {
                  (SQ <'\n'> <'\t\tmkdir "$count" &&\n'> <'\t\t(\n'> <'\t\t\tcd "$count" &&\n'> 
                    <'\t\t\tcreate_repo "$count"\n'> <'\t\t)\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {($ Id.VSub_DollarName pr)}
                {(SQ <'notes work'>)}
                {
                  (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd "$count" &&\n'> <'\t\t\ttest_notes "$count"\n'> 
                    <'\t\t)\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {
                  (DQ <USR_BIN_TIME> 
                    (BracedVarSub
                      left: <Id.Left_DollarBrace '${'>
                      token: <Id.VSub_Name pr>
                      var_name: pr
                      suffix_op: 
                        (suffix_op.Unary
                          op: <Id.VTest_ColonPlus _>
                          arg_word: {<','> ($ Id.VSub_DollarName pr)}
                        )
                      right: <Id.Right_DollarBrace '}'>
                    )
                  )
                }
                {(SQ <'notes timing with /usr/bin/time'>)}
                {
                  (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd "$count" &&\n'> <'\t\t\ttime_notes 100\n'> 
                    <'\t\t)\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <do_tests>
      more_env: []
      words: [{<do_tests>} {<10>}]
      redirects: []
      do_fork: T
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [count]
      iterable: (for_iter.Words words:[{<100>} {<1000>} {<10000>}])
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <do_tests>
              more_env: []
              words: [{<do_tests>} {(DQ ($ Id.VSub_DollarName count))} {<EXPENSIVE>}]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)