(CommandList
  children: [
    (C {(Lit_Other ":")} {(Included)} {(from)} {(t1000-read-tree-m-3way.sh)} {(and)} {(others)})
    (C {(mkdir)} {(Z)})
    (ForEach
      iter_name: a
      iter_words: [{(N)} {(D)} {(M)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (ForEach
              iter_name: b
              iter_words: [{(N)} {(D)} {(M)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:p)
                          op: Equal
                          rhs: {($ VSub_Name "$a") ($ VSub_Name "$b")}
                          spids: [50]
                        )
                      ]
                      spids: [50]
                    )
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {(This)}
                        {(is)}
                        {($ VSub_Name "$p")}
                        {(from)}
                        {(the)}
                        {(original)}
                        {(tree.)}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {($ VSub_Name "$p")}
                          spids: [71]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {(This)}
                        {(is)}
                        {(Z/) ($ VSub_Name "$p")}
                        {(from)}
                        {(the)}
                        {(original)}
                        {(tree.)}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(Z/) ($ VSub_Name "$p")}
                          spids: [92]
                        )
                      ]
                    )
                    (C {(test_expect_success)} 
                      {(DQ ("adding test file ") ($ VSub_Name "$p") (" and Z/") ($ VSub_Name "$p"))} {(SQ <"git update-index --add $p &&\n"> <"\t    git update-index --add Z/$p">)}
                    )
                  ]
                  spids: [47 116]
                )
              spids: [39 -1]
            )
          ]
          spids: [31 118]
        )
      spids: [24 -1]
    )
    (SimpleCommand
      words: [{(echo)} {(This)} {(is)} {(SS)} {(from)} {(the)} {(original)} {(tree.)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(SS)} spids:[136])]
    )
    (C {(test_expect_success)} {(SQ <"adding test file SS">)} {(SQ <"git update-index --add SS">)})
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(TT)} spids:[155])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("This is a trivial merge sample text.\n") 
              ("Branch A is expected to upcase this word, here.\n") ("There are some filler lines to avoid diff context\n") ("conflicts here,\n") ("like this one,\n") 
              ("and this one,\n") ("and this one is yet another one of them.\n") ("At the very end, here comes another line, that is\n") 
              ("the word, expected to be upcased by Branch B.\n") ("This concludes the trivial merge sample file.\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [158]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"adding test file TT">)} {(SQ <"git update-index --add TT">)})
    (C {(test_expect_success)} {(SQ <"prepare initial tree">)} {(SQ <"tree_O=$(git write-tree)">)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:to_remove)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [(C {(echo)} {(D) (Lit_Other "?")} {(Z/D) (Lit_Other "?")})]
                  )
                left_token: <Left_CommandSub "$(">
                spids: [206 214]
              )
            }
          spids: [205]
        )
      ]
      spids: [205]
    )
    (C {(rm)} {(-f)} {($ VSub_Name "$to_remove")})
    (C {(test_expect_success)} {(SQ <"change in branch A (removal)">)} 
      {(SQ <"git update-index --remove $to_remove">)}
    )
    (ForEach
      iter_name: p
      iter_words: [{(M) (Lit_Other "?")} {(Z/M) (Lit_Other "?")}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (SimpleCommand
              words: [
                {(echo)}
                {(This)}
                {(is)}
                {(modified)}
                {($ VSub_Name "$p")}
                {(KW_In in)}
                {(the)}
                {(branch)}
                {(A.)}
              ]
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{($ VSub_Name "$p")} spids:[270])]
            )
            (C {(test_expect_success)} {(SQ <"change in branch A (modification)">)} 
              {(DQ ("git update-index ") ($ VSub_Name "$p"))}
            )
          ]
          spids: [249 289]
        )
      spids: [242 -1]
    )
    (ForEach
      iter_name: p
      iter_words: [{(AN)} {(AA)} {(Z/AN)} {(Z/AA)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (SimpleCommand
              words: [
                {(echo)}
                {(This)}
                {(is)}
                {(added)}
                {($ VSub_Name "$p")}
                {(KW_In in)}
                {(the)}
                {(branch)}
                {(A.)}
              ]
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{($ VSub_Name "$p")} spids:[327])]
            )
            (C {(test_expect_success)} {(SQ <"change in branch A (addition)">)} 
              {(DQ ("git update-index --add ") ($ VSub_Name "$p"))}
            )
          ]
          spids: [306 346]
        )
      spids: [297 -1]
    )
    (SimpleCommand
      words: [{(echo)} {(This)} {(is)} {(SS)} {(from)} {(the)} {(modified)} {(tree.)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(SS)} spids:[365])]
    )
    (SimpleCommand
      words: [{(echo)} {(This)} {(is)} {(LL)} {(from)} {(the)} {(modified)} {(tree.)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(LL)} spids:[384])]
    )
    (C {(test_expect_success)} {(SQ <"change in branch A (addition)">)} 
      {(SQ <"git update-index --add LL &&\n"> <"     git update-index SS">)}
    )
    (C {(mv)} {(TT)} {(TT-)})
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"/Branch A/s/word/WORD/g">)}]
      redirects: [
        (Redir op_id:Redir_Less fd:-1 arg_word:{(TT-)} spids:[416])
        (Redir op_id:Redir_Great fd:-1 arg_word:{(TT)} spids:[419])
      ]
    )
    (C {(rm)} {(-f)} {(TT-)})
    (C {(test_expect_success)} {(SQ <"change in branch A (edit)">)} {(SQ <"git update-index TT">)})
    (C {(mkdir)} {(DF)})
    (SimpleCommand
      words: [
        {(echo)}
        {(Branch)}
        {(A)}
        {(makes)}
        {(a)}
        {(file)}
        {(at)}
        {(DF/DF) (Lit_Comma ",")}
        {(creating)}
        {(a)}
        {(directory)}
        {(DF.)}
      ]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(DF/DF)} spids:[472])]
    )
    (C {(test_expect_success)} {(SQ <"change in branch A (change file to directory)">)} 
      {(SQ <"git update-index --add DF/DF">)}
    )
    (C {(test_expect_success)} {(SQ <"recording branch A tree">)} {(SQ <"tree_A=$(git write-tree)">)})
    (C {(rm)} {(-rf)} 
      {(Lit_Other "[") (NDMASLT) (Lit_Other "]") (Lit_Other "[") (NDMASLT) (Lit_Other "]")} {(Z)} {(DF)}
    )
    (C {(mkdir)} {(Z)})
    (C {(test_expect_success)} {(SQ <"reading original tree and checking out">)} 
      {(SQ <"git read-tree $tree_O &&\n"> <"     git checkout-index -a">)}
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:to_remove)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [(C {(echo)} {(Lit_Other "?") (D)} {(Z/) (Lit_Other "?") (D)})]
                  )
                left_token: <Left_CommandSub "$(">
                spids: [551 560]
              )
            }
          spids: [550]
        )
      ]
      spids: [550]
    )
    (C {(rm)} {(-f)} {($ VSub_Name "$to_remove")})
    (C {(test_expect_success)} {(SQ <"change in branch B (removal)">)} 
      {(DQ ("git update-index --remove ") ($ VSub_Name "$to_remove"))}
    )
    (ForEach
      iter_name: p
      iter_words: [{(Lit_Other "?") (M)} {(Z/) (Lit_Other "?") (M)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (SimpleCommand
              words: [
                {(echo)}
                {(This)}
                {(is)}
                {(modified)}
                {($ VSub_Name "$p")}
                {(KW_In in)}
                {(the)}
                {(branch)}
                {(B.)}
              ]
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{($ VSub_Name "$p")} spids:[618])]
            )
            (C {(test_expect_success)} {(SQ <"change in branch B (modification)">)} 
              {(DQ ("git update-index ") ($ VSub_Name "$p"))}
            )
          ]
          spids: [597 637]
        )
      spids: [589 -1]
    )
    (ForEach
      iter_name: p
      iter_words: [{(NA)} {(AA)} {(Z/NA)} {(Z/AA)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (SimpleCommand
              words: [
                {(echo)}
                {(This)}
                {(is)}
                {(added)}
                {($ VSub_Name "$p")}
                {(KW_In in)}
                {(the)}
                {(branch)}
                {(B.)}
              ]
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{($ VSub_Name "$p")} spids:[675])]
            )
            (C {(test_expect_success)} {(SQ <"change in branch B (addition)">)} 
              {(DQ ("git update-index --add ") ($ VSub_Name "$p"))}
            )
          ]
          spids: [654 694]
        )
      spids: [645 -1]
    )
    (SimpleCommand
      words: [{(echo)} {(This)} {(is)} {(SS)} {(from)} {(the)} {(modified)} {(tree.)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(SS)} spids:[712])]
    )
    (SimpleCommand
      words: [{(echo)} {(This)} {(is)} {(LL)} {(from)} {(the)} {(modified)} {(tree.)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(LL)} spids:[731])]
    )
    (C {(test_expect_success)} {(SQ <"change in branch B (addition and modification)">)} 
      {(SQ <"git update-index --add LL &&\n"> <"     git update-index SS">)}
    )
    (C {(mv)} {(TT)} {(TT-)})
    (SimpleCommand
      words: [{(sed)} {(-e)} {(SQ <"/Branch B/s/word/WORD/g">)}]
      redirects: [
        (Redir op_id:Redir_Less fd:-1 arg_word:{(TT-)} spids:[763])
        (Redir op_id:Redir_Great fd:-1 arg_word:{(TT)} spids:[766])
      ]
    )
    (C {(rm)} {(-f)} {(TT-)})
    (C {(test_expect_success)} {(SQ <"change in branch B (modification)">)} 
      {(SQ <"git update-index TT">)}
    )
    (SimpleCommand
      words: [{(echo)} {(Branch)} {(B)} {(makes)} {(a)} {(file)} {(at)} {(DF.)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(DF)} spids:[806])]
    )
    (C {(test_expect_success)} 
      {(SQ <"change in branch B (addition of a file to conflict with directory)">)} {(SQ <"git update-index --add DF">)}
    )
    (C {(test_expect_success)} {(SQ <"recording branch B tree">)} {(SQ <"tree_B=$(git write-tree)">)})
    (C {(test_expect_success)} {(SQ <"keep contents of 3 trees for easy access">)} 
      {
        (SQ <"rm -f .git/index &&\n"> <"     git read-tree $tree_O &&\n"> <"     mkdir .orig-O &&\n"> 
          <"     git checkout-index --prefix=.orig-O/ -f -q -a &&\n"> <"     rm -f .git/index &&\n"> <"     git read-tree $tree_A &&\n"> <"     mkdir .orig-A &&\n"> 
          <"     git checkout-index --prefix=.orig-A/ -f -q -a &&\n"> <"     rm -f .git/index &&\n"> <"     git read-tree $tree_B &&\n"> <"     mkdir .orig-B &&\n"> 
          <"     git checkout-index --prefix=.orig-B/ -f -q -a">
        )
      }
    )
  ]
)