(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: 
            {
              (SQ <'Test submodules config cache infrastructure\n'> <'\n'> 
                <'This test verifies that parsing .gitmodules configurations directly\n'> <'from the database and from the worktree works.\n'>
              )
            }
          spids: [13]
        )
      ]
      spids: [13]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:TEST_NO_CREATE_REPO) op:Equal rhs:{(1)} spids:[22])]
      spids: [22]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ <'submodule config cache setup'>)} 
      {
        (SQ <'\n'> <'\tmkdir submodule &&\n'> <'\t(cd submodule &&\n'> <'\t\tgit init &&\n'> 
          <'\t\techo a >a &&\n'> <'\t\tgit add . &&\n'> <'\t\tgit commit -ma\n'> <'\t) &&\n'> <'\tmkdir super &&\n'> <'\t(cd super &&\n'> 
          <'\t\tgit init &&\n'> <'\t\tgit submodule add ../submodule &&\n'> <'\t\tgit submodule add ../submodule a &&\n'> 
          <'\t\tgit commit -m "add as submodule and as a" &&\n'> <'\t\tgit mv a b &&\n'> <'\t\tgit commit -m "move a to b"\n'> <'\t)\n'>
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(super/expect)} spids:[59])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("Submodule name: 'a' for path 'a'\n") ("Submodule name: 'a' for path 'b'\n") 
                ("Submodule name: 'submodule' for path 'submodule'\n") ("Submodule name: 'submodule' for path 'submodule'\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [62]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'test parsing and lookup of submodule config by path'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> <'\t\ttest-submodule-config \\\n'> <'\t\t\tHEAD^ a \\\n'> 
          <'\t\t\tHEAD b \\\n'> <'\t\t\tHEAD^ submodule \\\n'> <'\t\t\tHEAD submodule \\\n'> <'\t\t\t\t>actual &&\n'> 
          <'\t\ttest_cmp expect actual\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'test parsing and lookup of submodule config by name'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> <'\t\ttest-submodule-config --name \\\n'> <'\t\t\tHEAD^ a \\\n'> 
          <'\t\t\tHEAD a \\\n'> <'\t\t\tHEAD^ submodule \\\n'> <'\t\t\tHEAD submodule \\\n'> <'\t\t\t\t>actual &&\n'> 
          <'\t\ttest_cmp expect actual\n'> <'\t)\n'>
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(super/expect_error)} spids:[113])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("Submodule name: 'a' for path 'b'\n") 
                ("Submodule name: 'submodule' for path 'submodule'\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [116]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'error in one submodule config lets continue'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> <'\t\tcp .gitmodules .gitmodules.bak &&\n'> 
          <'\t\techo "\tvalue = \\"" >>.gitmodules &&\n'> <'\t\tgit add .gitmodules &&\n'> <'\t\tmv .gitmodules.bak .gitmodules &&\n'> 
          <'\t\tgit commit -m "add error" &&\n'> <'\t\ttest-submodule-config \\\n'> <'\t\t\tHEAD b \\\n'> <'\t\t\tHEAD submodule \\\n'> 
          <'\t\t\t\t>actual &&\n'> <'\t\ttest_cmp expect_error actual\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'error message contains blob reference'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> <'\t\tsha1=$(git rev-parse HEAD) &&\n'> 
          <'\t\ttest-submodule-config \\\n'> <'\t\t\tHEAD b \\\n'> <'\t\t\tHEAD submodule \\\n'> <'\t\t\t\t2>actual_err &&\n'> 
          <'\t\ttest_i18ngrep "submodule-blob $sha1:.gitmodules" actual_err >/dev/null\n'> <'\t)\n'>
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(super/expect_url)} spids:[167])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("Submodule url: 'git@somewhere.else.net:a.git' for path 'b'\n") 
                ("Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule'\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [170]
        )
      ]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(super/expect_local_path)} spids:[179])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("Submodule name: 'a' for path 'c'\n") 
                ("Submodule name: 'submodule' for path 'submodule'\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [182]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'reading of local configuration'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> <'\t\told_a=$(git config submodule.a.url) &&\n'> 
          <'\t\told_submodule=$(git config submodule.submodule.url) &&\n'> <'\t\tgit config submodule.a.url git@somewhere.else.net:a.git &&\n'> 
          <'\t\tgit config submodule.submodule.url git@somewhere.else.net:submodule.git &&\n'> <'\t\ttest-submodule-config --url \\\n'> <'\t\t\t"" b \\\n'> <'\t\t\t"" submodule \\\n'> 
          <'\t\t\t\t>actual &&\n'> <'\t\ttest_cmp expect_url actual &&\n'> <'\t\tgit config submodule.a.path c &&\n'> 
          <'\t\ttest-submodule-config \\\n'> <'\t\t\t"" c \\\n'> <'\t\t\t"" submodule \\\n'> <'\t\t\t\t>actual &&\n'> 
          <'\t\ttest_cmp expect_local_path actual &&\n'> <'\t\tgit config submodule.a.url $old_a &&\n'> 
          <'\t\tgit config submodule.submodule.url $old_submodule &&\n'> <'\t\tgit config --unset submodule.a.path c\n'> <'\t)\n'>
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir
          op_id: Redir_Great
          fd: -1
          arg_word: {(super/expect_fetchrecurse_die.err)}
          spids: [222]
        )
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ('fatal: bad submodule.submodule.fetchrecursesubmodules argument: blabla\n'))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [225]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'local error in fetchrecursesubmodule dies early'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> 
          <'\t\tgit config submodule.submodule.fetchrecursesubmodules blabla &&\n'> <'\t\ttest_must_fail test-submodule-config \\\n'> <'\t\t\t"" b \\\n'> <'\t\t\t"" submodule \\\n'> 
          <'\t\t\t\t>actual.out 2>actual.err &&\n'> <'\t\ttouch expect_fetchrecurse_die.out &&\n'> 
          <'\t\ttest_cmp expect_fetchrecurse_die.out actual.out  &&\n'> <'\t\ttest_cmp expect_fetchrecurse_die.err actual.err  &&\n'> 
          <'\t\tgit config --unset submodule.submodule.fetchrecursesubmodules\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'error in history in fetchrecursesubmodule lets continue'>)} 
      {
        (SQ <'\n'> <'\t(cd super &&\n'> <'\t\tgit config -f .gitmodules \\\n'> 
          <'\t\t\tsubmodule.submodule.fetchrecursesubmodules blabla &&\n'> <'\t\tgit add .gitmodules &&\n'> <'\t\tgit config --unset -f .gitmodules \\\n'> 
          <'\t\t\tsubmodule.submodule.fetchrecursesubmodules &&\n'> <'\t\tgit commit -m "add error in fetchrecursesubmodules" &&\n'> <'\t\ttest-submodule-config \\\n'> 
          <'\t\t\tHEAD b \\\n'> <'\t\t\tHEAD submodule \\\n'> <'\t\t\t\t>actual &&\n'> <'\t\ttest_cmp expect_error actual  &&\n'> 
          <'\t\tgit reset --hard HEAD^\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)