(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 verbose submodule differences in git diff\n'> <'\n'> 
                <'This test tries to verify the sanity of the --submodule 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.AndOr
      children: [
        (command.Simple
          blame_tok: <test_create_repo>
          more_env: []
          words: [{<test_create_repo>} {<sm1>}]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <add_file>
          more_env: []
          words: [{<add_file>} {<.>} {<foo>}]
          redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'head1='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'head1='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'head1='> name:head1)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <add_file>
                    more_env: []
                    words: [{<add_file>} {<sm1>} {<foo1>} {<foo2>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'fullhead1='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'fullhead1='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fullhead1='> name:fullhead1)
          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 <'added submodule'>)}
        {
          (SQ <'\n'> <'\tgit add sm1 &&\n'> <'\tgit diff-index -p --submodule=log HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 0000000...$head1 (new submodule)\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'> <'\tgit config diff.submodule log &&\n'> <'\tgit add sm1 &&\n'> 
            <'\tgit diff --cached >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 0000000...$head1 (new submodule)\n'> <'\tEOF\n'> 
            <'\tgit config --unset diff.submodule &&\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=log HEAD >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.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modified submodule(forward)'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule=log >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.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=log HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head2..$head3 (rewind):\n'> <'\t  < Add foo3 ($added foo3)\n'> 
            <'\t  < Add foo2 ($added foo2)\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=log HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head2...$head4:\n'> <'\t  > Add foo5 ($added foo5)\n'> 
            <'\t  > Add foo4 ($added foo4)\n'> <'\t  < Add foo3 ($added foo3)\n'> <'\t  < Add foo2 ($added foo2)\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=log --cached >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..$head5\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=log >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tdiff --git a/sm1 b/sm1\n'> <'\tdeleted file mode 100644\n'> <'\tindex $head5..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'> <'\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=log 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..$head5\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=log 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=log HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tdiff --git a/sm1 b/sm1\n'> <'\tdeleted file mode 100644\n'> <'\tindex $head5..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'> <'\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=log 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=log 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=log 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=log 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=log 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 modifed content'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> 
            <'\tSubmodule sm1 contains modified 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 and modifed content (untracked ignored)'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified 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 and modifed content (dirty ignored)'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=dirty --submodule=log 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 modifed content (all ignored)'>)}
        {
          (SQ <'\n'> <'\techo new > sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules --submodule=log 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 modifed content'>)}
        {
          (SQ <'\n'> <'\trm -f sm1/new-file &&\n'> 
            <'\tgit diff-index -p --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\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=log HEAD >actual &&\n'> 
                <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> 
            <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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=log 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 modifed content'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains untracked content\n'> 
            <'\tSubmodule sm1 contains modified content\n'> <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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 modifed content (untracked ignored)'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\n'> 
            <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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 modifed content (dirty ignored)'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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 modifed content (all ignored)'>)}
        {
          (SQ <'\n'> <'\techo modification >> sm1/foo6 &&\n'> 
            <'\tgit diff-index -p --ignore-submodules --submodule=log 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 modifed content'>)}
        {
          (SQ <'\n'> <'\trm -f sm1/new-file &&\n'> 
            <'\tgit diff-index -p --submodule=log HEAD >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 contains modified content\n'> 
            <'\tSubmodule sm1 $head6..$head8:\n'> <'\t  > change\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=log HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6...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=log HEAD >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6...0000000 (submodule deleted)\n'> 
            <'\tSubmodule sm2 0000000...$head7 (new submodule)\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=log HEAD sm2 >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm2 0000000...$head7 (new submodule)\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=log HEAD^ >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6...0000000 (submodule deleted)\n'> 
            <'\tSubmodule sm2 0000000...$head7 (new submodule)\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 <'given commit --submodule'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule HEAD^ >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tSubmodule sm1 $head6...0000000 (submodule deleted)\n'> 
            <'\tSubmodule sm2 0000000...$head7 (new submodule)\n'> <'\tEOF\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'fullhead7='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'fullhead7='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fullhead7='> name:fullhead7)
          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>} {<sm2>}]
                            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 <'given commit --submodule=short'>)}
        {
          (SQ <'\n'> <'\tgit diff-index -p --submodule=short HEAD^ >actual &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tdiff --git a/sm1 b/sm1\n'> <'\tdeleted file mode 160000\n'> <'\tindex $head6..0000000\n'> 
            <'\t--- a/sm1\n'> <'\t+++ /dev/null\n'> <'\t@@ -1 +0,0 @@\n'> <'\t-Subproject commit $fullhead6\n'> 
            <'\tdiff --git a/sm2 b/sm2\n'> <'\tnew file mode 160000\n'> <'\tindex 0000000..$head7\n'> <'\t--- /dev/null\n'> <'\t+++ b/sm2\n'> 
            <'\t@@ -0,0 +1 @@\n'> <'\t+Subproject commit $fullhead7\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 with .git file'>)}
        {
          (SQ <'\n'> <'\tgit diff --submodule HEAD^ >actual &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tSubmodule sm1 $head6...0000000 (submodule deleted)\n'> <'\tSubmodule sm2 0000000...$head7 (new submodule)\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 with objects referenced by alternates'>)}
        {
          (SQ <'\n'> <'\tmkdir sub_alt &&\n'> <'\t(cd sub_alt &&\n'> <'\t\tgit init &&\n'> 
            <'\t\techo a >a &&\n'> <'\t\tgit add a &&\n'> <'\t\tgit commit -m a\n'> <'\t) &&\n'> <'\tmkdir super &&\n'> <'\t(cd super &&\n'> 
            <'\t\tgit clone -s ../sub_alt sub &&\n'> <'\t\tgit init &&\n'> <'\t\tgit add sub &&\n'> <'\t\tgit commit -m "sub a"\n'> <'\t) &&\n'> 
            <'\t(cd sub_alt &&\n'> <'\t\tsha1_before=$(git rev-parse --short HEAD)\n'> <'\t\techo b >b &&\n'> <'\t\tgit add b &&\n'> 
            <'\t\tgit commit -m b &&\n'> <'\t\tsha1_after=$(git rev-parse --short HEAD) &&\n'> <'\t\t{\n'> 
            <'\t\t\techo "Submodule sub $sha1_before..$sha1_after:" &&\n'> <'\t\t\techo "  > b"\n'> <'\t\t} >../expected\n'> <'\t) &&\n'> <'\t(cd super &&\n'> <'\t\t(cd sub &&\n'> 
            <'\t\t\tgit fetch &&\n'> <'\t\t\tgit checkout origin/master\n'> <'\t\t) &&\n'> <'\t\tgit diff --submodule > ../actual\n'> 
            <'\t) &&\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
    )
  ]
)