(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: 
            {
              (SQ (Token id:Id.Lit_Chars val:'Three way merge with read-tree -m\n' span_id:15) 
                (Token id:Id.Lit_Chars val:'\n' span_id:16) (Token id:Id.Lit_Chars val:'This test tries three-way merge with read-tree -m\n' span_id:17) 
                (Token id:Id.Lit_Chars val:'\n' span_id:18) 
                (Token
                  id: Id.Lit_Chars
                  val: 'There is one ancestor (called O for Original) and two branches A\n'
                  span_id: 19
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: 'and B derived from it.  We want to do a 3-way merge between A and\n'
                  span_id: 20
                ) (Token id:Id.Lit_Chars val:'B, using O as the common ancestor.\n' span_id:21) 
                (Token id:Id.Lit_Chars val:'\n' span_id:22) (Token id:Id.Lit_Chars val:'    merge A O B\n' span_id:23) (Token id:Id.Lit_Chars val:'\n' span_id:24) 
                (Token
                  id: Id.Lit_Chars
                  val: 'Decisions are made by comparing contents of O, A and B pathname\n'
                  span_id: 25
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: 'by pathname.  The result is determined by the following guiding\n'
                  span_id: 26
                ) (Token id:Id.Lit_Chars val:'principle:\n' span_id:27) (Token id:Id.Lit_Chars val:'\n' span_id:28) 
                (Token
                  id: Id.Lit_Chars
                  val: ' - If only A does something to it and B does not touch it, take\n'
                  span_id: 29
                ) (Token id:Id.Lit_Chars val:'   whatever A does.\n' span_id:30) 
                (Token id:Id.Lit_Chars val:'\n' span_id:31) 
                (Token
                  id: Id.Lit_Chars
                  val: ' - If only B does something to it and A does not touch it, take\n'
                  span_id: 32
                ) (Token id:Id.Lit_Chars val:'   whatever B does.\n' span_id:33) 
                (Token id:Id.Lit_Chars val:'\n' span_id:34) 
                (Token
                  id: Id.Lit_Chars
                  val: ' - If both A and B does something but in the same way, take\n'
                  span_id: 35
                ) (Token id:Id.Lit_Chars val:'   whatever they do.\n' span_id:36) 
                (Token id:Id.Lit_Chars val:'\n' span_id:37) 
                (Token
                  id: Id.Lit_Chars
                  val: ' - If A and B does something but different things, we need a\n'
                  span_id: 38
                ) (Token id:Id.Lit_Chars val:'   3-way merge:\n' span_id:39) (Token id:Id.Lit_Chars val:'\n' span_id:40) 
                (Token
                  id: Id.Lit_Chars
                  val: '   - We cannot do anything about the following cases:\n'
                  span_id: 41
                ) (Token id:Id.Lit_Chars val:'\n' span_id:42) 
                (Token
                  id: Id.Lit_Chars
                  val: '     * O does not have it.  A and B both must be adding to the\n'
                  span_id: 43
                ) (Token id:Id.Lit_Chars val:'       same path independently.\n' span_id:44) 
                (Token id:Id.Lit_Chars val:'\n' span_id:45) (Token id:Id.Lit_Chars val:'     * A deletes it.  B must be modifying.\n' span_id:46) 
                (Token id:Id.Lit_Chars val:'\n' span_id:47) (Token id:Id.Lit_Chars val:'   - Otherwise, A and B are modifying.  Run 3-way merge.\n' span_id:48) 
                (Token id:Id.Lit_Chars val:'\n' span_id:49) (Token id:Id.Lit_Chars val:'First, the case matrix.\n' span_id:50) 
                (Token id:Id.Lit_Chars val:'\n' span_id:51) (Token id:Id.Lit_Chars val:' - Vertical axis is for A' span_id:52)
              ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:54)) 
              (SQ (Token id:Id.Lit_Chars val:'s actions.\n' span_id:56) 
                (Token id:Id.Lit_Chars val:' - Horizontal axis is for B' span_id:57)
              ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:59)) 
              (SQ (Token id:Id.Lit_Chars val:'s actions.\n' span_id:61) 
                (Token id:Id.Lit_Chars val:'\n' span_id:62) 
                (Token
                  id: Id.Lit_Chars
                  val: '.----------------------------------------------------------------.\n'
                  span_id: 63
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '| A        B | No Action  |   Delete   |   Modify   |    Add     |\n'
                  span_id: 64
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|------------+------------+------------+------------+------------|\n'
                  span_id: 65
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '| No Action  |            |            |            |            |\n'
                  span_id: 66
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            | select O   | delete     | select B   | select B   |\n'
                  span_id: 67
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            |            |            |            |            |\n'
                  span_id: 68
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|------------+------------+------------+------------+------------|\n'
                  span_id: 69
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '| Delete     |            |            | ********** |    can     |\n'
                  span_id: 70
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            | delete     | delete     | merge      |    not     |\n'
                  span_id: 71
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            |            |            |            |  happen    |\n'
                  span_id: 72
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|------------+------------+------------+------------+------------|\n'
                  span_id: 73
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '| Modify     |            | ********** | ?????????? |    can     |\n'
                  span_id: 74
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            | select A   | merge      | select A=B |    not     |\n'
                  span_id: 75
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            |            |            | merge      |  happen    |\n'
                  span_id: 76
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|------------+------------+------------+------------+------------|\n'
                  span_id: 77
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '| Add        |            |    can     |    can     | ?????????? |\n'
                  span_id: 78
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            | select A   |    not     |    not     | select A=B |\n'
                  span_id: 79
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '|            |            |  happen    |  happen    | merge      |\n'
                  span_id: 80
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '.----------------------------------------------------------------.\n'
                  span_id: 81
                ) (Token id:Id.Lit_Chars val:'\n' span_id:82) (Token id:Id.Lit_Chars val:'In addition:\n' span_id:83) 
                (Token id:Id.Lit_Chars val:'\n' span_id:84) 
                (Token
                  id: Id.Lit_Chars
                  val: ' SS: a special case of MM, where A and B makes the same modification.\n'
                  span_id: 85
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: ' LL: a special case of AA, where A and B creates the same file.\n'
                  span_id: 86
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: ' TT: a special case of MM, where A and B makes mergeable changes.\n'
                  span_id: 87
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: ' DF: a special case, where A makes a directory and B makes a file.\n'
                  span_id: 88
                ) (Token id:Id.Lit_Chars val:'\n' span_id:89)
              )
            }
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-read-tree.sh)})
    (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-read-tree-m-3way.sh)})
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:123)
          fd: -1
          arg_word: {(expected)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:126)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:127)) 
              (OF)
            }
          here_end_span_id: 175
          stdin_parts: [
            ('100644 X 2\tAA\n')
            ('100644 X 3\tAA\n')
            ('100644 X 0\tAN\n')
            ('100644 X 1\tDD\n')
            ('100644 X 3\tDF\n')
            ('100644 X 2\tDF/DF\n')
            ('100644 X 1\tDM\n')
            ('100644 X 3\tDM\n')
            ('100644 X 1\tDN\n')
            ('100644 X 3\tDN\n')
            ('100644 X 0\tLL\n')
            ('100644 X 1\tMD\n')
            ('100644 X 2\tMD\n')
            ('100644 X 1\tMM\n')
            ('100644 X 2\tMM\n')
            ('100644 X 3\tMM\n')
            ('100644 X 0\tMN\n')
            ('100644 X 0\tNA\n')
            ('100644 X 1\tND\n')
            ('100644 X 2\tND\n')
            ('100644 X 0\tNM\n')
            ('100644 X 0\tNN\n')
            ('100644 X 0\tSS\n')
            ('100644 X 1\tTT\n')
            ('100644 X 2\tTT\n')
            ('100644 X 3\tTT\n')
            ('100644 X 2\tZ/AA\n')
            ('100644 X 3\tZ/AA\n')
            ('100644 X 0\tZ/AN\n')
            ('100644 X 1\tZ/DD\n')
            ('100644 X 1\tZ/DM\n')
            ('100644 X 3\tZ/DM\n')
            ('100644 X 1\tZ/DN\n')
            ('100644 X 3\tZ/DN\n')
            ('100644 X 1\tZ/MD\n')
            ('100644 X 2\tZ/MD\n')
            ('100644 X 1\tZ/MM\n')
            ('100644 X 2\tZ/MM\n')
            ('100644 X 3\tZ/MM\n')
            ('100644 X 0\tZ/MN\n')
            ('100644 X 0\tZ/NA\n')
            ('100644 X 1\tZ/ND\n')
            ('100644 X 2\tZ/ND\n')
            ('100644 X 0\tZ/NM\n')
            ('100644 X 0\tZ/NN\n')
          ]
        )
      ]
    )
    (command.ShFunction
      name: check_result
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.Pipeline
                  children: [
                    (C {(git)} {(ls-files)} {(--stage)})
                    (command.Simple
                      words: [
                        {(sed)}
                        {(-e)}
                        {(SQ (Token id:Id.Lit_Chars val:'s/ ' span_id:198)) 
                          (DQ ($ Id.VSub_DollarName '$_x40')) (SQ (Token id:Id.Lit_Chars val:' / X /' span_id:204))
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:207)
                          fd: -1
                          arg_word: {(current)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(expected)} {(current)})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'3-way merge with git read-tree -m, empty cache' span_id:233))} 
      {
        (DQ ('rm -fr [NDMALTS][NDMALTSF] Z &&\n') ('     rm .git/index &&\n') 
          ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') 
          ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'3-way merge with git read-tree -m, match H' span_id:263))} 
      {
        (DQ ('rm -fr [NDMALTS][NDMALTSF] Z &&\n') ('     rm .git/index &&\n') 
          ('     read_tree_must_succeed ') ($ Id.VSub_DollarName '$tree_A') (' &&\n') ('     git checkout-index -f -u -a &&\n') 
          ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') 
          ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (command.Simple
      words: [{(Id.Lit_Other ':')}]
      redirects: [
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:288)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:289)) 
              (ND_OF_CASE_TABLE)
            }
          here_end_span_id: 345
          stdin_parts: [
            ('\n')
            ('We have so far tested only empty index and clean-and-matching-A index\n')
            ('case which are trivial.  Make sure index requirements are also\n')
            ('checked.\n')
            ('\n')
            ('"git read-tree -m O A B"\n')
            ('\n')
            ('     O       A       B         result      index requirements\n')
            ('-------------------------------------------------------------------\n')
            ('  1  missing missing missing   -           must not exist.\n')
            (' ------------------------------------------------------------------\n')
            ('  2  missing missing exists    take B*     must match B, if exists.\n')
            (' ------------------------------------------------------------------\n')
            ('  3  missing exists  missing   take A*     must match A, if exists.\n')
            (' ------------------------------------------------------------------\n')
            ('  4  missing exists  A!=B      no merge    must match A and be\n')
            ('                                           up-to-date, if exists.\n')
            (' ------------------------------------------------------------------\n')
            ('  5  missing exists  A==B      take A      must match A, if exists.\n')
            (' ------------------------------------------------------------------\n')
            ('  6  exists  missing missing   remove      must not exist.\n')
            (' ------------------------------------------------------------------\n')
            ('  7  exists  missing O!=B      no merge    must not exist.\n')
            (' ------------------------------------------------------------------\n')
            ('  8  exists  missing O==B      remove      must not exist.\n')
            (' ------------------------------------------------------------------\n')
            ('  9  exists  O!=A    missing   no merge    must match A and be\n')
            ('                                           up-to-date, if exists.\n')
            (' ------------------------------------------------------------------\n')
            (' 10  exists  O==A    missing   no merge    must match A\n')
            (' ------------------------------------------------------------------\n')
            (' 11  exists  O!=A    O!=B      no merge    must match A and be\n')
            ('                     A!=B                  up-to-date, if exists.\n')
            (' ------------------------------------------------------------------\n')
            (' 12  exists  O!=A    O!=B      take A      must match A, if exists.\n')
            ('                     A==B\n')
            (' ------------------------------------------------------------------\n')
            (' 13  exists  O!=A    O==B      take A      must match A, if exists.\n')
            (' ------------------------------------------------------------------\n')
            (' 14  exists  O==A    O!=B      take B      if exists, must either (1)\n')
            ('                                           match A and be up-to-date,\n')
            ('                                           or (2) match B.\n')
            (' ------------------------------------------------------------------\n')
            (' 15  exists  O==A    O==B      take B      must match A if exists.\n')
            (' ------------------------------------------------------------------\n')
            (' 16  exists  O==A    O==B      barf        must match A if exists.\n')
            ('     *multi* in one  in another\n')
            ('-------------------------------------------------------------------\n')
            ('\n')
            ('Note: we need to be careful in case 2 and 3.  The tree A may contain\n')
            ('DF (file) when tree B require DF to be a directory by having DF/DF\n')
            ('(file).\n')
            ('\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'1 - must not have an entry not in A.' span_id:350))} 
      {
        (DQ ('\n') ('     rm -f .git/index XX &&\n') ('     echo XX >XX &&\n') 
          ('     git update-index --add XX &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') 
          (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'2 - must match B in !O && !A && B case.' span_id:373))} 
      {
        (DQ ('rm -f .git/index NA &&\n') ('     cp .orig-B/NA NA &&\n') 
          ('     git update-index --add NA &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '2 - matching B alone is OK in !O && !A && B case.'
            span_id: 396
          )
        )
      } 
      {
        (DQ ('rm -f .git/index NA &&\n') ('     cp .orig-B/NA NA &&\n') 
          ('     git update-index --add NA &&\n') ('     echo extra >>NA &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'3 - must match A in !O && A && !B case.' span_id:420))} 
      {
        (DQ ('rm -f .git/index AN &&\n') ('     cp .orig-A/AN AN &&\n') 
          ('     git update-index --add AN &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '3 - matching A alone is OK in !O && A && !B case.'
            span_id: 445
          )
        )
      } 
      {
        (DQ ('rm -f .git/index AN &&\n') ('     cp .orig-A/AN AN &&\n') 
          ('     git update-index --add AN &&\n') ('     echo extra >>AN &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'3 (fail) - must match A in !O && A && !B case.' span_id:469))} 
      {
        (DQ ('\n') ('     rm -f .git/index AN &&\n') ('     cp .orig-A/AN AN &&\n') 
          ('     echo extra >>AN &&\n') ('     git update-index --add AN &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '4 - must match and be up-to-date in !O && A && B && A!=B case.'
            span_id: 493
          )
        )
      } 
      {
        (DQ ('rm -f .git/index AA &&\n') ('     cp .orig-A/AA AA &&\n') 
          ('     git update-index --add AA &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.'
            span_id: 518
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index AA &&\n') ('     cp .orig-A/AA AA &&\n') 
          ('     git update-index --add AA &&\n') ('     echo extra >>AA &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.'
            span_id: 542
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index AA &&\n') ('     cp .orig-A/AA AA &&\n') 
          ('     echo extra >>AA &&\n') ('     git update-index --add AA &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'5 - must match in !O && A && B && A==B case.' span_id:566))} 
      {
        (DQ ('rm -f .git/index LL &&\n') ('     cp .orig-A/LL LL &&\n') 
          ('     git update-index --add LL &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'5 - must match in !O && A && B && A==B case.' span_id:591))} 
      {
        (DQ ('rm -f .git/index LL &&\n') ('     cp .orig-A/LL LL &&\n') 
          ('     git update-index --add LL &&\n') ('     echo extra >>LL &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '5 (fail) - must match A in !O && A && B && A==B case.'
            span_id: 617
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index LL &&\n') ('     cp .orig-A/LL LL &&\n') 
          ('     echo extra >>LL &&\n') ('     git update-index --add LL &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'6 - must not exist in O && !A && !B case' span_id:641))} 
      {
        (DQ ('\n') ('     rm -f .git/index DD &&\n') ('     echo DD >DD &&\n') 
          ('     git update-index --add DD &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') 
          (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'7 - must not exist in O && !A && B && O!=B case' span_id:664))} 
      {
        (DQ ('\n') ('     rm -f .git/index DM &&\n') ('     cp .orig-B/DM DM &&\n') 
          ('     git update-index --add DM &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') 
          (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'8 - must not exist in O && !A && B && O==B case' span_id:687))} 
      {
        (DQ ('\n') ('     rm -f .git/index DN &&\n') ('     cp .orig-B/DN DN &&\n') 
          ('     git update-index --add DN &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') 
          (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '9 - must match and be up-to-date in O && A && !B && O!=A case'
            span_id: 710
          )
        )
      } 
      {
        (DQ ('rm -f .git/index MD &&\n') ('     cp .orig-A/MD MD &&\n') 
          ('     git update-index --add MD &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case'
            span_id: 735
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index MD &&\n') ('     cp .orig-A/MD MD &&\n') 
          ('     git update-index --add MD &&\n') ('     echo extra >>MD &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case'
            span_id: 759
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index MD &&\n') ('     cp .orig-A/MD MD &&\n') 
          ('     echo extra >>MD &&\n') ('     git update-index --add MD &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '10 - must match and be up-to-date in O && A && !B && O==A case'
            span_id: 783
          )
        )
      } 
      {
        (DQ ('rm -f .git/index ND &&\n') ('     cp .orig-A/ND ND &&\n') 
          ('     git update-index --add ND &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '10 (fail) - must match and be up-to-date in O && A && !B && O==A case'
            span_id: 808
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index ND &&\n') ('     cp .orig-A/ND ND &&\n') 
          ('     git update-index --add ND &&\n') ('     echo extra >>ND &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '10 (fail) - must match and be up-to-date in O && A && !B && O==A case'
            span_id: 832
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index ND &&\n') ('     cp .orig-A/ND ND &&\n') 
          ('     echo extra >>ND &&\n') ('     git update-index --add ND &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '11 - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case'
            span_id: 856
          )
        )
      } 
      {
        (DQ ('rm -f .git/index MM &&\n') ('     cp .orig-A/MM MM &&\n') 
          ('     git update-index --add MM &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case'
            span_id: 881
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index MM &&\n') ('     cp .orig-A/MM MM &&\n') 
          ('     git update-index --add MM &&\n') ('     echo extra >>MM &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case'
            span_id: 905
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index MM &&\n') ('     cp .orig-A/MM MM &&\n') 
          ('     echo extra >>MM &&\n') ('     git update-index --add MM &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '12 - must match A in O && A && B && O!=A && A==B case'
            span_id: 929
          )
        )
      } 
      {
        (DQ ('rm -f .git/index SS &&\n') ('     cp .orig-A/SS SS &&\n') 
          ('     git update-index --add SS &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '12 - must match A in O && A && B && O!=A && A==B case'
            span_id: 954
          )
        )
      } 
      {
        (DQ ('rm -f .git/index SS &&\n') ('     cp .orig-A/SS SS &&\n') 
          ('     git update-index --add SS &&\n') ('     echo extra >>SS &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '12 (fail) - must match A in O && A && B && O!=A && A==B case'
            span_id: 980
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index SS &&\n') ('     cp .orig-A/SS SS &&\n') 
          ('     echo extra >>SS &&\n') ('     git update-index --add SS &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '13 - must match A in O && A && B && O!=A && O==B case'
            span_id: 1004
          )
        )
      } 
      {
        (DQ ('rm -f .git/index MN &&\n') ('     cp .orig-A/MN MN &&\n') 
          ('     git update-index --add MN &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '13 - must match A in O && A && B && O!=A && O==B case'
            span_id: 1029
          )
        )
      } 
      {
        (DQ ('rm -f .git/index MN &&\n') ('     cp .orig-A/MN MN &&\n') 
          ('     git update-index --add MN &&\n') ('     echo extra >>MN &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '14 - must match and be up-to-date in O && A && B && O==A && O!=B case'
            span_id: 1055
          )
        )
      } 
      {
        (DQ ('rm -f .git/index NM &&\n') ('     cp .orig-A/NM NM &&\n') 
          ('     git update-index --add NM &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '14 - may match B in O && A && B && O==A && O!=B case'
            span_id: 1080
          )
        )
      } 
      {
        (DQ ('rm -f .git/index NM &&\n') ('     cp .orig-B/NM NM &&\n') 
          ('     git update-index --add NM &&\n') ('     echo extra >>NM &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case'
            span_id: 1106
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index NM &&\n') ('     cp .orig-A/NM NM &&\n') 
          ('     git update-index --add NM &&\n') ('     echo extra >>NM &&\n') ('     read_tree_must_fail -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case'
            span_id: 1130
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index NM &&\n') ('     cp .orig-A/NM NM &&\n') 
          ('     echo extra >>NM &&\n') ('     git update-index --add NM &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '15 - must match A in O && A && B && O==A && O==B case'
            span_id: 1154
          )
        )
      } 
      {
        (DQ ('rm -f .git/index NN &&\n') ('     cp .orig-A/NN NN &&\n') 
          ('     git update-index --add NN &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '15 - must match A in O && A && B && O==A && O==B case'
            span_id: 1179
          )
        )
      } 
      {
        (DQ ('rm -f .git/index NN &&\n') ('     cp .orig-A/NN NN &&\n') 
          ('     git update-index --add NN &&\n') ('     echo extra >>NN &&\n') ('     read_tree_must_succeed -m ') ($ Id.VSub_DollarName '$tree_O') (' ') 
          ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') (' &&\n') ('     check_result')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '15 (fail) - must match A in O && A && B && O==A && O==B case'
            span_id: 1205
          )
        )
      } 
      {
        (DQ ('\n') ('     rm -f .git/index NN &&\n') ('     cp .orig-A/NN NN &&\n') 
          ('     echo extra >>NN &&\n') ('     git update-index --add NN &&\n') ('     read_tree_must_fail -m ') 
          ($ Id.VSub_DollarName '$tree_O') (' ') ($ Id.VSub_DollarName '$tree_A') (' ') ($ Id.VSub_DollarName '$tree_B') ('\n')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '16 - A matches in one and B matches in another.'
            span_id: 1232
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'rm -f .git/index F16 &&\n' span_id:1238) 
          (Token id:Id.Lit_Chars val:'    echo F16 >F16 &&\n' span_id:1239) (Token id:Id.Lit_Chars val:'    git update-index --add F16 &&\n' span_id:1240) 
          (Token id:Id.Lit_Chars val:'    tree0=$(git write-tree) &&\n' span_id:1241) (Token id:Id.Lit_Chars val:'    echo E16 >F16 &&\n' span_id:1242) 
          (Token id:Id.Lit_Chars val:'    git update-index F16 &&\n' span_id:1243) (Token id:Id.Lit_Chars val:'    tree1=$(git write-tree) &&\n' span_id:1244) 
          (Token
            id: Id.Lit_Chars
            val: '    read_tree_must_succeed -m $tree0 $tree1 $tree1 $tree0 &&\n'
            span_id: 1245
          ) (Token id:Id.Lit_Chars val:'    git ls-files --stage' span_id:1246)
        )
      }
    )
    (C {(test_done)})
  ]
)