(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 <'Support for diff format verbose submodule difference in git diff\n'> <'\n'> 
                <'This test tries to verify the sanity of --submodule=diff option of git diff.\n'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_encoding='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_encoding='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_encoding='> name:test_encoding)
          op: assign_op.Equal
          rhs: {(DQ <ISO8859-1>)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'added='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'added='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'added='> name:added)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <printf>
                    more_env: []
                    words: [
                      {<printf>}
                      {
                        (DQ <hinzugef> <Id.Lit_BadBackslash '\\'> <303> <Id.Lit_BadBackslash '\\'> 
                          <274gt>
                        )
                      }
                    ]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name_tok: <add_file>
      name: add_file
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Subshell
              left: <Id.Op_LParen _>
              child: 
                (command.AndOr
                  children: [
                    (command.Simple
                      blame_tok: <cd>
                      more_env: []
                      words: [{<cd>} {(DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ForEach
                      keyword: <Id.KW_For for>
                      iter_names: [name]
                      iterable: (for_iter__Args)
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (command.AndOr
                              children: [
                                (command.Simple
                                  blame_tok: <echo>
                                  more_env: []
                                  words: [{<echo>} {(DQ ($ Id.VSub_DollarName name))}]
                                  redirects: [
                                    (Redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {(DQ ($ Id.VSub_DollarName name))}
                                    )
                                  ]
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <git>
                                  more_env: []
                                  words: [{<git>} {<add>} {(DQ ($ Id.VSub_DollarName name))}]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <test_tick>
                                  more_env: []
                                  words: [{<test_tick>}]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Pipeline
                                  children: [
                                    (command.Simple
                                      blame_tok: <echo>
                                      more_env: []
                                      words: [
                                        {<echo>}
                                        {
                                          (DQ <'Add '> ($ Id.VSub_DollarName name) <' ('> 
                                            ($ Id.VSub_DollarName added) <' '> ($ Id.VSub_DollarName name) <')'>
                                          )
                                        }
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <iconv>
                                      more_env: []
                                      words: [
                                        {<iconv>}
                                        {<-f>}
                                        {<utf-8>}
                                        {<-t>}
                                        {($ Id.VSub_DollarName test_encoding)}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <git>
                                      more_env: []
                                      words: [
                                        {<git>}
                                        {<-c>}
                                        {
                                          (DQ <'i18n.commitEncoding='> 
                                            ($ Id.VSub_DollarName test_encoding)
                                          )
                                        }
                                        {<commit>}
                                        {<-F>}
                                        {<->}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_Pipe _> <Id.Op_Pipe _>]
                                )
                              ]
                              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                    )
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<rev-parse>} {<--short>} {<--verify>} {<HEAD>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
                )
              right: <Id.Right_Subshell _>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <commit_file>
      name: commit_file
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test_tick>
                  more_env: []
                  words: [{<test_tick>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [
                    {<git>}
                    {<commit>}
                    {(DQ ($ Id.VSub_At '@'))}
                    {<-m>}
                    {(DQ <'Commit '> ($ Id.VSub_Star '*'))}
                  ]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup repository'>)}
        {
          (SQ <'\n'> <'\ttest_create_repo sm1 &&\n'> <'\tadd_file . foo &&\n'> 
            <'\thead1=$(add_file sm1 foo1 foo2) &&\n'> <'\tfullhead1=$(git -C sm1 rev-parse --verify HEAD)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'added submodule'>)}
        {
          (SQ <'\n'> <'\tgit add sm1 &&\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 0000000...$head1 (new submodule)\n'> <'\tdiff --git a/sm1/foo1 b/sm1/foo1\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..1715acd\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo1\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo1\n'> <'\tdiff --git a/sm1/foo2 b/sm1/foo2\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..54b060e\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo2\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo2\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'added submodule, set diff.submodule'>)}
        {
          (SQ <'\n'> <'\ttest_config diff.submodule log &&\n'> <'\tgit add sm1 &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 0000000...$head1 (new submodule)\n'> 
            <'\tdiff --git a/sm1/foo1 b/sm1/foo1\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..1715acd\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo1\n'> 
            <'\t@@ -0,0 +1 @@\n'> <'\t+foo1\n'> <'\tdiff --git a/sm1/foo2 b/sm1/foo2\n'> <'\tnew file mode 100644\n'> 
            <'\tindex 0000000..54b060e\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo2\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo2\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--submodule=short overrides diff.submodule'>)}
        {
          (SQ <'\n'> <'\ttest_config diff.submodule log &&\n'> <'\tgit add sm1 &&\n'> 
            <'\tgit diff --submodule=short --cached >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tdiff --git a/sm1 b/sm1\n'> <'\tnew file mode 160000\n'> 
            <'\tindex 0000000..$head1\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+Subproject commit $fullhead1\n'> 
            <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'diff.submodule does not affect plumbing'>)}
        {
          (SQ <'\n'> <'\ttest_config diff.submodule log &&\n'> 
            <'\tgit diff-index -p HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tdiff --git a/sm1 b/sm1\n'> <'\tnew file mode 160000\n'> 
            <'\tindex 0000000..$head1\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+Subproject commit $fullhead1\n'> 
            <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <commit_file>
          more_env: []
          words: [{<commit_file>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'head2='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'head2='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head2='> name:head2)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <add_file>
                        more_env: []
                        words: [{<add_file>} {<sm1>} {<foo3>}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(forward)'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head1..$head2:\n'> <'\tdiff --git a/sm1/foo3 b/sm1/foo3\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..c1ec6c6\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo3\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo3\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(forward)'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule=diff >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tSubmodule sm1 $head1..$head2:\n'> <'\tdiff --git a/sm1/foo3 b/sm1/foo3\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..c1ec6c6\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo3\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo3\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(forward) --submodule'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tSubmodule sm1 $head1..$head2:\n'> <'\t  > Add foo3 ($added foo3)\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'fullhead2='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'fullhead2='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fullhead2='> name:fullhead2)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.CommandList
                    children: [
                      (command.Sentence
                        child: 
                          (command.Simple
                            blame_tok: <cd>
                            more_env: []
                            words: [{<cd>} {<sm1>}]
                            redirects: []
                            do_fork: T
                          )
                        terminator: <Id.Op_Semi _>
                      )
                      (command.Simple
                        blame_tok: <git>
                        more_env: []
                        words: [{<git>} {<rev-parse>} {<--verify>} {<HEAD>}]
                        redirects: []
                        do_fork: T
                      )
                    ]
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(forward) --submodule=short'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule=short >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tdiff --git a/sm1 b/sm1\n'> <'\tindex $head1..$head2 160000\n'> <'\t--- a/sm1\n'> <'\t+++ b/sm1\n'> <'\t@@ -1 +1 @@\n'> 
            <'\t-Subproject commit $fullhead1\n'> <'\t+Subproject commit $fullhead2\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <commit_file>
          more_env: []
          words: [{<commit_file>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'head3='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'head3='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head3='> name:head3)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.AndOr
                        children: [
                          (command.Simple
                            blame_tok: <cd>
                            more_env: []
                            words: [{<cd>} {<sm1>}]
                            redirects: []
                            do_fork: T
                          )
                          (command.Simple
                            blame_tok: <git>
                            more_env: []
                            words: [{<git>} {<reset>} {<--hard>} {<HEAD> <Id.Lit_TildeLike '~2'>}]
                            redirects: [
                              (Redir
                                op: <Id.Redir_Great '>'>
                                loc: (redir_loc.Fd fd:1)
                                arg: {<'/dev/null'>}
                              )
                            ]
                            do_fork: T
                          )
                          (command.Simple
                            blame_tok: <git>
                            more_env: []
                            words: [{<git>} {<rev-parse>} {<--short>} {<--verify>} {<HEAD>}]
                            redirects: []
                            do_fork: T
                          )
                        ]
                        ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(backward)'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head2..$head3 (rewind):\n'> <'\tdiff --git a/sm1/foo2 b/sm1/foo2\n'> 
            <'\tdeleted file mode 100644\n'> <'\tindex 54b060e..0000000\n'> <'\t--- a/sm1/foo2\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> 
            <'\t-foo2\n'> <'\tdiff --git a/sm1/foo3 b/sm1/foo3\n'> <'\tdeleted file mode 100644\n'> 
            <'\tindex c1ec6c6..0000000\n'> <'\t--- a/sm1/foo3\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> <'\t-foo3\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'head4='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'head4='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head4='> name:head4)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <add_file>
                    more_env: []
                    words: [{<add_file>} {<sm1>} {<foo4>} {<foo5>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(backward and forward)'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head2...$head4:\n'> <'\tdiff --git a/sm1/foo2 b/sm1/foo2\n'> 
            <'\tdeleted file mode 100644\n'> <'\tindex 54b060e..0000000\n'> <'\t--- a/sm1/foo2\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> 
            <'\t-foo2\n'> <'\tdiff --git a/sm1/foo3 b/sm1/foo3\n'> <'\tdeleted file mode 100644\n'> 
            <'\tindex c1ec6c6..0000000\n'> <'\t--- a/sm1/foo3\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> <'\t-foo3\n'> 
            <'\tdiff --git a/sm1/foo4 b/sm1/foo4\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..a0016db\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo4\n'> 
            <'\t@@ -0,0 +1 @@\n'> <'\t+foo4\n'> <'\tdiff --git a/sm1/foo5 b/sm1/foo5\n'> <'\tnew file mode 100644\n'> 
            <'\tindex 0000000..d6f2413\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo5\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo5\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <commit_file>
          more_env: []
          words: [{<commit_file>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <mv>
          more_env: []
          words: [{<mv>} {<sm1>} {<sm1-bak>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <echo>
          more_env: []
          words: [{<echo>} {<sm1>}]
          redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<sm1>})]
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'head5='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'head5='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head5='> name:head5)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (command.Simple
                            blame_tok: <git>
                            more_env: []
                            words: [{<git>} {<hash-object>} {<sm1>}]
                            redirects: []
                            do_fork: T
                          )
                          (command.Simple
                            blame_tok: <cut>
                            more_env: []
                            words: [{<cut>} {<-c1-7>}]
                            redirects: []
                            do_fork: T
                          )
                        ]
                        ops: [<Id.Op_Pipe _>]
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
        (command.Simple
          blame_tok: <git>
          more_env: []
          words: [{<git>} {<add>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <rm>
          more_env: []
          words: [{<rm>} {<-f>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <mv>
          more_env: []
          words: [{<mv>} {<sm1-bak>} {<sm1>}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'typechanged submodule(submodule->blob), --cached'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule=diff --cached >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head4...0000000 (submodule deleted)\n'> <'\tdiff --git a/sm1/foo1 b/sm1/foo1\n'> 
            <'\tdeleted file mode 100644\n'> <'\tindex 1715acd..0000000\n'> <'\t--- a/sm1/foo1\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> 
            <'\t-foo1\n'> <'\tdiff --git a/sm1/foo4 b/sm1/foo4\n'> <'\tdeleted file mode 100644\n'> 
            <'\tindex a0016db..0000000\n'> <'\t--- a/sm1/foo4\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> <'\t-foo4\n'> 
            <'\tdiff --git a/sm1/foo5 b/sm1/foo5\n'> <'\tdeleted file mode 100644\n'> <'\tindex d6f2413..0000000\n'> <'\t--- a/sm1/foo5\n'> 
            <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> <'\t-foo5\n'> <'\tdiff --git a/sm1 b/sm1\n'> <'\tnew file mode 100644\n'> 
            <'\tindex 0000000..9da5fb8\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+sm1\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'typechanged submodule(submodule->blob)'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule=diff >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tdiff --git a/sm1 b/sm1\n'> <'\tdeleted file mode 100644\n'> <'\tindex 9da5fb8..0000000\n'> <'\t--- a/sm1\n'> <'\t+++ /dev/null\n'> 
            <'\t@@ -1 +0,0 @@\n'> <'\t-sm1\n'> <'\tSubmodule sm1 0000000...$head4 (new submodule)\n'> 
            <'\tdiff --git a/sm1/foo1 b/sm1/foo1\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..1715acd\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo1\n'> 
            <'\t@@ -0,0 +1 @@\n'> <'\t+foo1\n'> <'\tdiff --git a/sm1/foo4 b/sm1/foo4\n'> <'\tnew file mode 100644\n'> 
            <'\tindex 0000000..a0016db\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo4\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo4\n'> 
            <'\tdiff --git a/sm1/foo5 b/sm1/foo5\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..d6f2413\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo5\n'> 
            <'\t@@ -0,0 +1 @@\n'> <'\t+foo5\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <rm>
          more_env: []
          words: [{<rm>} {<-rf>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <git>
          more_env: []
          words: [{<git>} {<checkout-index>} {<sm1>}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'typechanged submodule(submodule->blob)'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head4...0000000 (submodule deleted)\n'> <'\tdiff --git a/sm1 b/sm1\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..9da5fb8\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+sm1\n'> 
            <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <rm>
          more_env: []
          words: [{<rm>} {<-f>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <test_create_repo>
          more_env: []
          words: [{<test_create_repo>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'head6='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'head6='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head6='> name:head6)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <add_file>
                        more_env: []
                        words: [{<add_file>} {<sm1>} {<foo6>} {<foo7>}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
      ]
      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'fullhead6='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'fullhead6='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fullhead6='> name:fullhead6)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.CommandList
                    children: [
                      (command.Sentence
                        child: 
                          (command.Simple
                            blame_tok: <cd>
                            more_env: []
                            words: [{<cd>} {<sm1>}]
                            redirects: []
                            do_fork: T
                          )
                        terminator: <Id.Op_Semi _>
                      )
                      (command.Simple
                        blame_tok: <git>
                        more_env: []
                        words: [{<git>} {<rev-parse>} {<--verify>} {<HEAD>}]
                        redirects: []
                        do_fork: T
                      )
                    ]
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'nonexistent commit'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head4...$head6 (commits not present)\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <commit_file>
      more_env: []
      words: [{<commit_file>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'typechanged submodule(blob->submodule)'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tdiff --git a/sm1 b/sm1\n'> <'\tdeleted file mode 100644\n'> <'\tindex 9da5fb8..0000000\n'> 
            <'\t--- a/sm1\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> <'\t-sm1\n'> 
            <'\tSubmodule sm1 0000000...$head6 (new submodule)\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..462398b\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo6\n'> <'\tdiff --git a/sm1/foo7 b/sm1/foo7\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..6e9262c\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm1/foo7\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo7\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <commit_file>
          more_env: []
          words: [{<commit_file>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <test_expect_success>
          more_env: []
          words: [
            {<test_expect_success>}
            {(SQ <'submodule is up to date'>)}
            {
              (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
                <'\tcat >expected <<-EOF &&\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
              )
            }
          ]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked content'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/new-file &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked content (untracked ignored)'>)}
        {
          (SQ <'\n'> 
            <'\tgit diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked content (dirty ignored)'>)}
        {
          (SQ <'\n'> 
            <'\tgit diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked content (all ignored)'>)}
        {
          (SQ <'\n'> 
            <'\tgit diff-index -p --ignore-submodules=all --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked and modified content'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> 
            <'\tSubmodule sm1 contains modified content\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> 
            <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked and modified content (untracked ignored)'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\n'> 
            <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> 
            <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked and modified content (dirty ignored)'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains untracked and modified content (all ignored)'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'submodule contains modified content'>)}
        {
          (SQ <'\n'> <'\trm -f sm1/new-file &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\n'> 
            <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> 
            <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Subshell
          left: <Id.Op_LParen _>
          child: 
            (command.CommandList
              children: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <cd>
                      more_env: []
                      words: [{<cd>} {<sm1>}]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<commit>} {<-mchange>} {<foo6>}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
              ]
            )
          right: <Id.Right_Subshell _>
          redirects: []
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'head8='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'head8='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head8='> name:head8)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.CommandList
                        children: [
                          (command.Sentence
                            child: 
                              (command.Simple
                                blame_tok: <cd>
                                more_env: []
                                words: [{<cd>} {<sm1>}]
                                redirects: []
                                do_fork: T
                              )
                            terminator: <Id.Op_Semi _>
                          )
                          (command.Simple
                            blame_tok: <git>
                            more_env: []
                            words: [{<git>} {<rev-parse>} {<--short>} {<--verify>} {<HEAD>}]
                            redirects: []
                            do_fork: T
                          )
                        ]
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
        (command.Simple
          blame_tok: <test_expect_success>
          more_env: []
          words: [
            {<test_expect_success>}
            {(SQ <'submodule is modified'>)}
            {
              (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
                <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9..$head8:\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> 
                <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> 
                <'\ttest_cmp expected actual\n'>
              )
            }
          ]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked content'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/new-file &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> 
            <'\tSubmodule sm1 17243c9..$head8:\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> 
            <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked content (untracked ignored)'>)}
        {
          (SQ <'\n'> 
            <'\tgit diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9..$head8:\n'> 
            <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> 
            <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked content (dirty ignored)'>)}
        {
          (SQ <'\n'> 
            <'\tgit diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9..cfce562:\n'> 
            <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> 
            <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked content (all ignored)'>)}
        {
          (SQ <'\n'> 
            <'\tgit diff-index -p --ignore-submodules=all --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked and modified content'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> 
            <'\tSubmodule sm1 contains modified content\n'> <'\tSubmodule sm1 17243c9..cfce562:\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> 
            <'\tindex 462398b..dfda541 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1,2 @@\n'> <'\t-foo6\n'> <'\t+new\n'> 
            <'\t+modification\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked and modified content (untracked ignored)'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\n'> 
            <'\tSubmodule sm1 17243c9..cfce562:\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..e20e2d9 100644\n'> <'\t--- a/sm1/foo6\n'> 
            <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1,3 @@\n'> <'\t-foo6\n'> <'\t+new\n'> <'\t+modification\n'> <'\t+modification\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked and modified content (dirty ignored)'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9..cfce562:\n'> 
            <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..3e75765 100644\n'> <'\t--- a/sm1/foo6\n'> <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1 @@\n'> 
            <'\t-foo6\n'> <'\t+new\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains untracked and modified content (all ignored)'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules --submodule=diff HEAD >actual &&\n'> <'\t! test -s actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule contains modified content'>)}
        {
          (SQ <'\n'> <'\trm -f sm1/new-file &&\n'> 
            <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\n'> 
            <'\tSubmodule sm1 17243c9..cfce562:\n'> <'\tdiff --git a/sm1/foo6 b/sm1/foo6\n'> <'\tindex 462398b..ac466ca 100644\n'> <'\t--- a/sm1/foo6\n'> 
            <'\t+++ b/sm1/foo6\n'> <'\t@@ -1 +1,5 @@\n'> <'\t-foo6\n'> <'\t+new\n'> <'\t+modification\n'> <'\t+modification\n'> 
            <'\t+modification\n'> <'\t+modification\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <rm>
      more_env: []
      words: [{<rm>} {<-rf>} {<sm1>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'deleted submodule'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n'> <'\tEOF\n'> 
            <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <test_create_repo>
          more_env: []
          words: [{<test_create_repo>} {<sm2>}]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'head7='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'head7='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head7='> name:head7)
              op: assign_op.Equal
              rhs: 
                {
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <add_file>
                        more_env: []
                        words: [{<add_file>} {<sm2>} {<foo8>} {<foo9>}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
            )
          ]
          redirects: []
        )
        (command.Simple
          blame_tok: <git>
          more_env: []
          words: [{<git>} {<add>} {<sm2>}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'multiple submodules'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n'> 
            <'\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n'> <'\tdiff --git a/sm2/foo8 b/sm2/foo8\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..db9916b\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo8\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo8\n'> <'\tdiff --git a/sm2/foo9 b/sm2/foo9\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..9c3b4f6\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo9\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo9\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'path filter'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD sm2 >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n'> <'\tdiff --git a/sm2/foo8 b/sm2/foo8\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..db9916b\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo8\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo8\n'> <'\tdiff --git a/sm2/foo9 b/sm2/foo9\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..9c3b4f6\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo9\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo9\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <commit_file>
      more_env: []
      words: [{<commit_file>} {<sm2>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'given commit'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=diff HEAD^ >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n'> 
            <'\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n'> <'\tdiff --git a/sm2/foo8 b/sm2/foo8\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..db9916b\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo8\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo8\n'> <'\tdiff --git a/sm2/foo9 b/sm2/foo9\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..9c3b4f6\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo9\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo9\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup .git file for sm2'>)}
        {
          (SQ <'\n'> <'\t(cd sm2 &&\n'> <'\t REAL="$(pwd)/../.real" &&\n'> <'\t mv .git "$REAL"\n'> 
            <'\t echo "gitdir: $REAL" >.git)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'diff --submodule=diff with .git file'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule=diff HEAD^ >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n'> <'\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n'> <'\tdiff --git a/sm2/foo8 b/sm2/foo8\n'> 
            <'\tnew file mode 100644\n'> <'\tindex 0000000..db9916b\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo8\n'> <'\t@@ -0,0 +1 @@\n'> 
            <'\t+foo8\n'> <'\tdiff --git a/sm2/foo9 b/sm2/foo9\n'> <'\tnew file mode 100644\n'> <'\tindex 0000000..9c3b4f6\n'> 
            <'\t--- /dev/null\n'> <'\t+++ b/sm2/foo9\n'> <'\t@@ -0,0 +1 @@\n'> <'\t+foo9\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)