(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git update-index --again test.\n'>)}
          spids: [13]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (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'>) <OF>}
              here_end_span_id: 36
              stdin_parts: [
                <'100644 3b18e512dba79e4c8300dd08aeb37f8e728b8dad 0\tfile1\n'>
                <'100644 9db8893856a8a02eaa73470054b7c1c5a7c82e47 0\tfile2\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'update-index --add'>)} 
      {
        (SQ <'echo hello world >file1 &&\n'> <'\t echo goodbye people >file2 &&\n'> 
          <'\t git update-index --add file1 file2 &&\n'> <'\t git ls-files -s >current &&\n'> <'\t cmp current expected'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'update-index --again'>)} 
      {
        (SQ <'rm -f file1 &&\n'> <'\techo hello everybody >file2 &&\n'> 
          <'\tif git update-index --again\n'> <'\tthen\n'> <'\t\techo should have refused to remove file1\n'> <'\t\texit 1\n'> <'\telse\n'> 
          <'\t\techo happy - failed as expected\n'> <'\tfi &&\n'> <'\t git ls-files -s >current &&\n'> <'\t cmp current expected'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (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'>) <OF>}
              here_end_span_id: 88
              stdin_parts: [<'100644 0f1ae1422c2bf43f117d3dbd715c988a9ed2103f 0\tfile2\n'>]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'update-index --remove --again'>)} 
      {
        (SQ <'git update-index --remove --again &&\n'> <'\t git ls-files -s >current &&\n'> 
          <'\t cmp current expected'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'first commit'>)} {(SQ <'git commit -m initial'>)})
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (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'>) <OF>}
              here_end_span_id: 127
              stdin_parts: [
                <'100644 53ab446c3f4e42ce9bb728a0ccb283a101be4979 0\tdir1/file3\n'>
                <'100644 0f1ae1422c2bf43f117d3dbd715c988a9ed2103f 0\tfile2\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'update-index again'>)} 
      {
        (SQ <'mkdir -p dir1 &&\n'> <'\techo hello world >dir1/file3 &&\n'> 
          <'\techo goodbye people >file2 &&\n'> <'\tgit update-index --add file2 dir1/file3 &&\n'> <'\techo hello everybody >file2 &&\n'> 
          <'\techo happy >dir1/file3 &&\n'> <'\tgit update-index --again &&\n'> <'\tgit ls-files -s >current &&\n'> <'\tcmp current expected'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (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'>) <OF>}
              here_end_span_id: 161
              stdin_parts: [
                <'100644 d7fb3f695f06c759dbf3ab00046e7cc2da22d10f 0\tdir1/file3\n'>
                <'100644 0f1ae1422c2bf43f117d3dbd715c988a9ed2103f 0\tfile2\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'update-index --update from subdir'>)} 
      {
        (SQ <'echo not so happy >file2 &&\n'> <'\t(cd dir1 &&\n'> <'\tcat ../file2 >file3 &&\n'> 
          <'\tgit update-index --again\n'> <'\t) &&\n'> <'\tgit ls-files -s >current &&\n'> <'\tcmp current expected'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (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'>) <OF>}
              here_end_span_id: 193
              stdin_parts: [
                <'100644 594fb5bb1759d90998e2bf2a38261ae8e243c760 0\tdir1/file3\n'>
                <'100644 0f1ae1422c2bf43f117d3dbd715c988a9ed2103f 0\tfile2\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'update-index --update with pathspec'>)} 
      {
        (SQ <'echo very happy >file2 &&\n'> <'\tcat file2 >dir1/file3 &&\n'> 
          <'\tgit update-index --again dir1/ &&\n'> <'\tgit ls-files -s >current &&\n'> <'\tcmp current expected'>
        )
      }
    )
    (C {<test_done>})
  ]
)