(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ (Token id:Id.Lit_Chars val:'git remote porcelain-ish' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShFunction
      name: setup_repository
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(mkdir)} {(DQ ($ Id.VSub_Number '$1'))})
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                          ]
                          children: [
                            (C {(cd)} {(DQ ($ Id.VSub_Number '$1'))})
                            (C {(git)} {(init)})
                            (command.Simple
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:50)
                                  fd: -1
                                  arg_word: {(file)}
                                )
                              ]
                            )
                            (C {(git)} {(add)} {(file)})
                            (C {(test_tick)})
                            (C {(git)} {(commit)} {(-m)} {(DQ (Initial))})
                            (C {(git)} {(checkout)} {(-b)} {(side)})
                            (command.Simple
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:94)
                                  fd: -1
                                  arg_word: {(Id.KW_Elif elif)}
                                )
                              ]
                            )
                            (C {(git)} {(add)} {(Id.KW_Elif elif)})
                            (C {(test_tick)})
                            (C {(git)} {(commit)} {(-m)} {(DQ (Second))})
                            (C {(git)} {(checkout)} {(master)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: tokens_match
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Pipeline
                  children: [
                    (C {(echo)} {(DQ ($ Id.VSub_Number '$1'))})
                    (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:' ' span_id:158))} 
                      {(SQ (Token id:Id.Lit_Chars val:'\\012' span_id:162))}
                    )
                    (C {(sort)})
                    (command.Simple
                      words: [{(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'/^$/d' span_id:176))}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:179)
                          fd: -1
                          arg_word: {(expect)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (command.Pipeline
                  children: [
                    (C {(echo)} {(DQ ($ Id.VSub_Number '$2'))})
                    (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:' ' span_id:196))} 
                      {(SQ (Token id:Id.Lit_Chars val:'\\012' span_id:200))}
                    )
                    (C {(sort)})
                    (command.Simple
                      words: [{(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'/^$/d' span_id:214))}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:217)
                          fd: -1
                          arg_word: {(actual)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(expect)} {(actual)})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_remote_track
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:actual)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:241)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(git)} {(remote)} {(show)} {(DQ ($ Id.VSub_Number '$1'))})
                                  (C {(sed)} {(-ne)} 
                                    {
                                      (SQ 
                                        (Token
                                          id: Id.Lit_Chars
                                          val: 's|^    \\(.*\\) tracked$|\\1|p'
                                          span_id: 259
                                        )
                                      )
                                    }
                                  )
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [240]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(shift)})
                (C {(tokens_match)} {(DQ ($ Id.VSub_Star '$*'))} {(DQ ($ Id.VSub_DollarName '$actual'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_tracking_branch
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:f)
                      op: assign_op.Equal
                      rhs: {(DQ )}
                      spids: [290]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:r)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:298)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (C {(git)} {(for-each-ref)} {(DQ ('--format=%(refname)'))})
                                      (C {(sed)} {(-ne)} 
                                        {(DQ ('s|^refs/remotes/') ($ Id.VSub_Number '$1') ('/||p'))}
                                      )
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                      spids: [297]
                    )
                  ]
                )
                (C {(shift)})
                (C {(tokens_match)} {(DQ ($ Id.VSub_Star '$*'))} {(DQ ($ Id.VSub_DollarName '$r'))})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:347) 
          (Token id:Id.Lit_Chars val:'\tsetup_repository one &&\n' span_id:348) (Token id:Id.Lit_Chars val:'\tsetup_repository two &&\n' span_id:349) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:350) (Token id:Id.Lit_Chars val:'\t\tcd two &&\n' span_id:351) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch another\n' span_id:352) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:353) 
          (Token id:Id.Lit_Chars val:'\tgit clone one test\n' span_id:354)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'add remote whose URL agrees with url.<...>.insteadOf'
            span_id: 361
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:365) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_config url.git@host.com:team/repo.git.insteadOf myremote &&\n'
            span_id: 366
          ) (Token id:Id.Lit_Chars val:'\tgit remote add myremote git@host.com:team/repo.git\n' span_id:367)
        )
      }
    )
    (C {(test_expect_success)} {(C_LOCALE_OUTPUT)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote information for the origin' span_id:376))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:380) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:381) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:382) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttokens_match origin "$(git remote)" &&\n'
            span_id: 383
          ) (Token id:Id.Lit_Chars val:'\t\tcheck_remote_track origin master side &&\n' span_id:384) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tcheck_tracking_branch origin HEAD master side\n'
            span_id: 385
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:386)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add another remote' span_id:393))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:397) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:398) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:399) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add -f second ../two &&\n'
            span_id: 400
          ) (Token id:Id.Lit_Chars val:'\t\ttokens_match "origin second" "$(git remote)" &&\n' span_id:401) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tcheck_tracking_branch second master side another &&\n'
            span_id: 402
          ) (Token id:Id.Lit_Chars val:'\t\tgit for-each-ref "--format=%(refname)" refs/remotes |\n' span_id:403) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tsed -e "/^refs\\/remotes\\/origin\\//d" \\\n'
            span_id: 404
          ) (Token id:Id.Lit_Chars val:'\t\t    -e "/^refs\\/remotes\\/second\\//d" >actual &&\n' span_id:405) 
          (Token id:Id.Lit_Chars val:'\t\t>expect &&\n' span_id:406) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect actual\n' span_id:407) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:408)
        )
      }
    )
    (C {(test_expect_success)} {(C_LOCALE_OUTPUT)} 
      {(SQ (Token id:Id.Lit_Chars val:'check remote-tracking' span_id:417))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:421) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:422) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:423) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tcheck_remote_track origin master side &&\n'
            span_id: 424
          ) (Token id:Id.Lit_Chars val:'\t\tcheck_remote_track second master side another\n' span_id:425) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:426)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote forces tracking branches' span_id:433))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:437) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:438) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:439) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tcase $(git config remote.second.fetch) in\n'
            span_id: 440
          ) (Token id:Id.Lit_Chars val:'\t\t+*) true ;;\n' span_id:441) 
          (Token id:Id.Lit_Chars val:'\t\t *) false ;;\n' span_id:442) (Token id:Id.Lit_Chars val:'\t\tesac\n' span_id:443) (Token id:Id.Lit_Chars val:'\t)\n' span_id:444)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'remove remote' span_id:451))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:455) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:456) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:457) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&\n'
            span_id: 458
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote rm second\n' span_id:459) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:460)
        )
      }
    )
    (C {(test_expect_success)} {(C_LOCALE_OUTPUT)} 
      {(SQ (Token id:Id.Lit_Chars val:'remove remote' span_id:469))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:473) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:474) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:475) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttokens_match origin "$(git remote)" &&\n'
            span_id: 476
          ) (Token id:Id.Lit_Chars val:'\t\tcheck_remote_track origin master side &&\n' span_id:477) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit for-each-ref "--format=%(refname)" refs/remotes |\n'
            span_id: 478
          ) (Token id:Id.Lit_Chars val:'\t\tsed -e "/^refs\\/remotes\\/origin\\//d" >actual &&\n' span_id:479) 
          (Token id:Id.Lit_Chars val:'\t\t>expect &&\n' span_id:480) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect actual\n' span_id:481) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:482)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remove remote protects local branches' span_id:489))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:493) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:494) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:495) 
          (Token id:Id.Lit_Chars val:'\t\tcat >expect1 <<-\\EOF &&\n' span_id:496) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tNote: A branch outside the refs/remotes/ hierarchy was not removed;\n'
            span_id: 497
          ) (Token id:Id.Lit_Chars val:'\t\tto delete it, use:\n' span_id:498) 
          (Token id:Id.Lit_Chars val:'\t\t  git branch -d master\n' span_id:499) (Token id:Id.Lit_Chars val:'\t\tEOF\n' span_id:500) 
          (Token id:Id.Lit_Chars val:'\t\tcat >expect2 <<-\\EOF &&\n' span_id:501) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tNote: Some branches outside the refs/remotes/ hierarchy were not removed;\n'
            span_id: 502
          ) (Token id:Id.Lit_Chars val:'\t\tto delete them, use:\n' span_id:503) 
          (Token id:Id.Lit_Chars val:'\t\t  git branch -d foobranch\n' span_id:504) (Token id:Id.Lit_Chars val:'\t\t  git branch -d master\n' span_id:505) 
          (Token id:Id.Lit_Chars val:'\t\tEOF\n' span_id:506) (Token id:Id.Lit_Chars val:'\t\tgit tag footag &&\n' span_id:507) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.oops.fetch "+refs/*:refs/*" &&\n'
            span_id: 508
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote remove oops 2>actual1 &&\n' span_id:509) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch foobranch &&\n' span_id:510) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.oops.fetch "+refs/*:refs/*" &&\n'
            span_id: 511
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote rm oops 2>actual2 &&\n' span_id:512) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -d foobranch &&\n' span_id:513) (Token id:Id.Lit_Chars val:'\t\tgit tag -d footag &&\n' span_id:514) 
          (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect1 actual1 &&\n' span_id:515) (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect2 actual2\n' span_id:516) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:517)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'remove errors out early when deleting non-existent branch'
            span_id: 524
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:528) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:529) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:530) 
          (Token
            id: Id.Lit_Chars
            val: '\t\techo "fatal: No such remote: foo" >expect &&\n'
            span_id: 531
          ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git remote rm foo 2>actual &&\n' span_id:532) 
          (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect actual\n' span_id:533) (Token id:Id.Lit_Chars val:'\t)\n' span_id:534)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'rename errors out early when deleting non-existent branch'
            span_id: 541
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:545) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:546) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:547) 
          (Token
            id: Id.Lit_Chars
            val: '\t\techo "fatal: No such remote: foo" >expect &&\n'
            span_id: 548
          ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git remote rename foo bar 2>actual &&\n' span_id:549) 
          (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect actual\n' span_id:550) (Token id:Id.Lit_Chars val:'\t)\n' span_id:551)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'add existing foreign_vcs remote' span_id:558))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:562) 
          (Token id:Id.Lit_Chars val:'\ttest_config remote.foo.vcs bar &&\n' span_id:563) (Token id:Id.Lit_Chars val:'\techo "fatal: remote foo already exists." >expect &&\n' span_id:564) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote add foo bar 2>actual &&\n'
            span_id: 565
          ) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual\n' span_id:566)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'add existing foreign_vcs remote' span_id:573))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:577) 
          (Token id:Id.Lit_Chars val:'\ttest_config remote.foo.vcs bar &&\n' span_id:578) (Token id:Id.Lit_Chars val:'\ttest_config remote.bar.vcs bar &&\n' span_id:579) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "fatal: remote bar already exists." >expect &&\n'
            span_id: 580
          ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git remote rename foo bar 2>actual &&\n' span_id:581) 
          (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual\n' span_id:582)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:588)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:591)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 627
          stdin_parts: [
            ('* remote origin\n')
            ('  Fetch URL: ')
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:596)
              command_list: (command.CommandList children:[(C {(pwd)})])
            )
            ('/one\n')
            ('  Push  URL: ')
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:601)
              command_list: (command.CommandList children:[(C {(pwd)})])
            )
            ('/one\n')
            ('  HEAD branch: master\n')
            ('  Remote branches:\n')
            ('    master new (next fetch will store in remotes/origin)\n')
            ('    side   tracked\n')
            ("  Local branches configured for 'git pull':\n")
            ('    ahead    merges with remote master\n')
            ('    master   merges with remote master\n')
            ('    octopus  merges with remote topic-a\n')
            ('                and with remote topic-b\n')
            ('                and with remote topic-c\n')
            ('    rebase  rebases onto remote master\n')
            ("  Local refs configured for 'git push':\n")
            ('    master pushes to master   (local out of date)\n')
            ('    master pushes to upstream (create)\n')
            ('* remote two\n')
            ('  Fetch URL: ../two\n')
            ('  Push  URL: ../three\n')
            ('  HEAD branch: master\n')
            ("  Local refs configured for 'git push':\n")
            ('    ahead  forces to master  (fast-forwardable)\n')
            ('    master pushes to another (up to date)\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:show span_id:632))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:636) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:637) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:638) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\tgit config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&\n'
            span_id: 639
          ) (Token id:Id.Lit_Chars val:'\t\tgit fetch &&\n' span_id:640) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit checkout -b ahead origin/master &&\n'
            span_id: 641
          ) (Token id:Id.Lit_Chars val:'\t\techo 1 >>file &&\n' span_id:642) 
          (Token id:Id.Lit_Chars val:'\t\ttest_tick &&\n' span_id:643) (Token id:Id.Lit_Chars val:'\t\tgit commit -m update file &&\n' span_id:644) 
          (Token id:Id.Lit_Chars val:'\t\tgit checkout master &&\n' span_id:645) (Token id:Id.Lit_Chars val:'\t\tgit branch --track octopus origin/master &&\n' span_id:646) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit branch --track rebase origin/master &&\n'
            span_id: 647
          ) (Token id:Id.Lit_Chars val:'\t\tgit branch -d -r origin/master &&\n' span_id:648) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.two.url ../two &&\n'
            span_id: 649
          ) (Token id:Id.Lit_Chars val:'\t\tgit config --add remote.two.pushurl ../three &&\n' span_id:650) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config branch.rebase.rebase true &&\n'
            span_id: 651
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config branch.octopus.merge "topic-a topic-b topic-c" &&\n'
            span_id: 652
          ) (Token id:Id.Lit_Chars val:'\t\t(\n' span_id:653) 
          (Token id:Id.Lit_Chars val:'\t\t\tcd ../one &&\n' span_id:654) (Token id:Id.Lit_Chars val:'\t\t\techo 1 >file &&\n' span_id:655) 
          (Token id:Id.Lit_Chars val:'\t\t\ttest_tick &&\n' span_id:656) (Token id:Id.Lit_Chars val:'\t\t\tgit commit -m update file\n' span_id:657) 
          (Token id:Id.Lit_Chars val:'\t\t) &&\n' span_id:658) (Token id:Id.Lit_Chars val:'\t\tgit config --add remote.origin.push : &&\n' span_id:659) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\tgit config --add remote.origin.push refs/heads/master:refs/heads/upstream &&\n'
            span_id: 660
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.origin.push +refs/tags/lastbackup &&\n'
            span_id: 661
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.two.push +refs/heads/ahead:refs/heads/master &&\n'
            span_id: 662
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.two.push refs/heads/master:refs/heads/another &&\n'
            span_id: 663
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote show origin two >output &&\n' span_id:664) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -d rebase octopus &&\n' span_id:665) (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect output\n' span_id:666) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:667)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:673)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:676)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 702
          stdin_parts: [
            ('* remote origin\n')
            ('  Fetch URL: ')
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:681)
              command_list: (command.CommandList children:[(C {(pwd)})])
            )
            ('/one\n')
            ('  Push  URL: ')
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:686)
              command_list: (command.CommandList children:[(C {(pwd)})])
            )
            ('/one\n')
            ('  HEAD branch: (not queried)\n')
            ('  Remote branches: (status not queried)\n')
            ('    master\n')
            ('    side\n')
            ("  Local branches configured for 'git pull':\n")
            ('    ahead  merges with remote master\n')
            ('    master merges with remote master\n')
            ("  Local refs configured for 'git push' (status not queried):\n")
            ('    (matching)           pushes to (matching)\n')
            ('    refs/heads/master    pushes to refs/heads/upstream\n')
            ('    refs/tags/lastbackup forces to refs/tags/lastbackup\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'show -n' span_id:707))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:711) 
          (Token id:Id.Lit_Chars val:'\tmv one one.unreachable &&\n' span_id:712) (Token id:Id.Lit_Chars val:'\t(\n' span_id:713) 
          (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:714) (Token id:Id.Lit_Chars val:'\t\tgit remote show -n origin >output &&\n' span_id:715) 
          (Token id:Id.Lit_Chars val:'\t\tmv ../one.unreachable ../one &&\n' span_id:716) (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect output\n' span_id:717) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:718)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:prune span_id:725))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:729) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:730) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:731) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -m side side2\n' span_id:732) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:733) (Token id:Id.Lit_Chars val:'\t(\n' span_id:734) 
          (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:735) (Token id:Id.Lit_Chars val:'\t\tgit fetch origin &&\n' span_id:736) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote prune origin &&\n' span_id:737) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse refs/remotes/origin/side2 &&\n' span_id:738) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse refs/remotes/origin/side\n'
            span_id: 739
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:740)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set-head --delete' span_id:747))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:751) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:752) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:753) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit symbolic-ref refs/remotes/origin/HEAD &&\n'
            span_id: 754
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote set-head --delete origin &&\n' span_id:755) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git symbolic-ref refs/remotes/origin/HEAD\n'
            span_id: 756
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:757)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set-head --auto' span_id:764))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:768) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:769) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:770) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote set-head --auto origin &&\n'
            span_id: 771
          ) (Token id:Id.Lit_Chars val:'\t\techo refs/remotes/origin/master >expect &&\n' span_id:772) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n'
            span_id: 773
          ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:774) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:775)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'set-head --auto has no problem w/multiple HEADs' span_id:782))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:786) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:787) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:788) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit fetch two "refs/heads/*:refs/remotes/two/*" &&\n'
            span_id: 789
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote set-head --auto two >output 2>&1 &&\n' span_id:790) 
          (Token
            id: Id.Lit_Chars
            val: '\t\techo "two/HEAD set to master" >expect &&\n'
            span_id: 791
          ) (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect output\n' span_id:792) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:793)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:799)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:802)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:803)) 
              (OF)
            }
          here_end_span_id: 807
          stdin_parts: [('refs/remotes/origin/side2\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set-head explicit' span_id:812))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:816) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:817) (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:818) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote set-head origin side2 &&\n'
            span_id: 819
          ) (Token id:Id.Lit_Chars val:'\t\tgit symbolic-ref refs/remotes/origin/HEAD >output &&\n' span_id:820) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote set-head origin master &&\n'
            span_id: 821
          ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:822) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:823)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:829)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:832)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 843
          stdin_parts: [
            ('Pruning origin\n')
            ('URL: ')
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:837)
              command_list: (command.CommandList children:[(C {(pwd)})])
            )
            ('/one\n')
            (' * [would prune] origin/side2\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'prune --dry-run' span_id:848))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:852) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:853) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:854) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -m side2 side) &&\n' span_id:855) (Token id:Id.Lit_Chars val:'\t(\n' span_id:856) 
          (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:857) (Token id:Id.Lit_Chars val:'\t\tgit remote prune --dry-run origin >output &&\n' span_id:858) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit rev-parse refs/remotes/origin/side2 &&\n'
            span_id: 859
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse refs/remotes/origin/side &&\n'
            span_id: 860
          ) (Token id:Id.Lit_Chars val:'\t(\n' span_id:861) 
          (Token id:Id.Lit_Chars val:'\t\tcd ../one &&\n' span_id:862) (Token id:Id.Lit_Chars val:'\t\tgit branch -m side side2) &&\n' span_id:863) 
          (Token id:Id.Lit_Chars val:'\t\ttest_i18ncmp expect output\n' span_id:864) (Token id:Id.Lit_Chars val:'\t)\n' span_id:865)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add --mirror && prune' span_id:872))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:876) 
          (Token id:Id.Lit_Chars val:'\tmkdir mirror &&\n' span_id:877) (Token id:Id.Lit_Chars val:'\t(\n' span_id:878) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror &&\n' span_id:879) (Token id:Id.Lit_Chars val:'\t\tgit init --bare &&\n' span_id:880) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add --mirror -f origin ../one\n'
            span_id: 881
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:882) (Token id:Id.Lit_Chars val:'\t(\n' span_id:883) 
          (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:884) (Token id:Id.Lit_Chars val:'\t\tgit branch -m side2 side\n' span_id:885) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:886) (Token id:Id.Lit_Chars val:'\t(\n' span_id:887) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror &&\n' span_id:888) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/heads/side2 &&\n' span_id:889) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/side &&\n'
            span_id: 890
          ) (Token id:Id.Lit_Chars val:'\t\tgit fetch origin &&\n' span_id:891) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote prune origin &&\n' span_id:892) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/side2 &&\n'
            span_id: 893
          ) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/heads/side\n' span_id:894) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:895)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add --mirror=fetch' span_id:902))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:906) 
          (Token id:Id.Lit_Chars val:'\tmkdir mirror-fetch &&\n' span_id:907) (Token id:Id.Lit_Chars val:'\tgit init mirror-fetch/parent &&\n' span_id:908) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:909) (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/parent &&\n' span_id:910) 
          (Token id:Id.Lit_Chars val:'\t\ttest_commit one\n' span_id:911) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:912) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit init --bare mirror-fetch/child &&\n'
            span_id: 913
          ) (Token id:Id.Lit_Chars val:'\t(\n' span_id:914) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/child &&\n' span_id:915) (Token id:Id.Lit_Chars val:'\t\tgit remote add --mirror=fetch -f parent ../parent\n' span_id:916) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:917)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'fetch mirrors act as mirrors during fetch' span_id:924))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:928) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:929) (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/parent &&\n' span_id:930) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch new &&\n' span_id:931) (Token id:Id.Lit_Chars val:'\t\tgit branch -m master renamed\n' span_id:932) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:933) (Token id:Id.Lit_Chars val:'\t(\n' span_id:934) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/child &&\n' span_id:935) (Token id:Id.Lit_Chars val:'\t\tgit fetch parent &&\n' span_id:936) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit rev-parse --verify refs/heads/new &&\n'
            span_id: 937
          ) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/heads/renamed\n' span_id:938) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:939)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fetch mirrors can prune' span_id:946))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:950) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:951) (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/child &&\n' span_id:952) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote prune parent &&\n' span_id:953) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/master\n'
            span_id: 954
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:955)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'fetch mirrors do not act as mirrors during push' span_id:962))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:966) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:967) (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/parent &&\n' span_id:968) 
          (Token id:Id.Lit_Chars val:'\t\tgit checkout HEAD^0\n' span_id:969) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:970) (Token id:Id.Lit_Chars val:'\t(\n' span_id:971) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/child &&\n' span_id:972) (Token id:Id.Lit_Chars val:'\t\tgit branch -m renamed renamed2 &&\n' span_id:973) 
          (Token id:Id.Lit_Chars val:'\t\tgit push parent :\n' span_id:974) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:975) (Token id:Id.Lit_Chars val:'\t(\n' span_id:976) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/parent &&\n' span_id:977) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify renamed &&\n' span_id:978) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/renamed2\n'
            span_id: 979
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:980)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'add fetch mirror with specific branches' span_id:987))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:991) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit init --bare mirror-fetch/track &&\n'
            span_id: 992
          ) (Token id:Id.Lit_Chars val:'\t(\n' span_id:993) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/track &&\n' span_id:994) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add --mirror=fetch -t heads/new parent ../parent\n'
            span_id: 995
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:996)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'fetch mirror respects specific branches' span_id:1003))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1007) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1008) (Token id:Id.Lit_Chars val:'\t\tcd mirror-fetch/track &&\n' span_id:1009) 
          (Token id:Id.Lit_Chars val:'\t\tgit fetch parent &&\n' span_id:1010) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/heads/new &&\n' span_id:1011) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/renamed\n'
            span_id: 1012
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1013)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add --mirror=push' span_id:1020))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1024) 
          (Token id:Id.Lit_Chars val:'\tmkdir mirror-push &&\n' span_id:1025) (Token id:Id.Lit_Chars val:'\tgit init --bare mirror-push/public &&\n' span_id:1026) 
          (Token id:Id.Lit_Chars val:'\tgit init mirror-push/private &&\n' span_id:1027) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1028) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-push/private &&\n' span_id:1029) (Token id:Id.Lit_Chars val:'\t\ttest_commit one &&\n' span_id:1030) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add --mirror=push public ../public\n'
            span_id: 1031
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1032)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'push mirrors act as mirrors during push' span_id:1039))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1043) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1044) (Token id:Id.Lit_Chars val:'\t\tcd mirror-push/private &&\n' span_id:1045) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch new &&\n' span_id:1046) (Token id:Id.Lit_Chars val:'\t\tgit branch -m master renamed &&\n' span_id:1047) 
          (Token id:Id.Lit_Chars val:'\t\tgit push public\n' span_id:1048) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1049) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1050) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-push/private &&\n' span_id:1051) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/heads/new &&\n' span_id:1052) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit rev-parse --verify refs/heads/renamed &&\n'
            span_id: 1053
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/master\n'
            span_id: 1054
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1055)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'push mirrors do not act as mirrors during fetch'
            span_id: 1062
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1066) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1067) (Token id:Id.Lit_Chars val:'\t\tcd mirror-push/public &&\n' span_id:1068) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit branch -m renamed renamed2 &&\n'
            span_id: 1069
          ) (Token id:Id.Lit_Chars val:'\t\tgit symbolic-ref HEAD refs/heads/renamed2\n' span_id:1070) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1071) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1072) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-push/private &&\n' span_id:1073) (Token id:Id.Lit_Chars val:'\t\tgit fetch public &&\n' span_id:1074) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit rev-parse --verify refs/heads/renamed &&\n'
            span_id: 1075
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/heads/renamed2\n'
            span_id: 1076
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1077)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'push mirrors do not allow you to specify refs' span_id:1084))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1088) 
          (Token id:Id.Lit_Chars val:'\tgit init mirror-push/track &&\n' span_id:1089) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1090) 
          (Token id:Id.Lit_Chars val:'\t\tcd mirror-push/track &&\n' span_id:1091) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git remote add --mirror=push -t new public ../public\n'
            span_id: 1092
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1093)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add alt && prune' span_id:1100))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1104) 
          (Token id:Id.Lit_Chars val:'\tmkdir alttst &&\n' span_id:1105) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1106) 
          (Token id:Id.Lit_Chars val:'\t\tcd alttst &&\n' span_id:1107) (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:1108) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add -f origin ../one &&\n'
            span_id: 1109
          ) (Token id:Id.Lit_Chars val:'\t\tgit config remote.alt.url ../one &&\n' span_id:1110) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remote.alt.fetch "+refs/heads/*:refs/remotes/origin/*"\n'
            span_id: 1111
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1112) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1113) 
          (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1114) (Token id:Id.Lit_Chars val:'\t\tgit branch -m side side2\n' span_id:1115) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1116) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1117) 
          (Token id:Id.Lit_Chars val:'\t\tcd alttst &&\n' span_id:1118) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/remotes/origin/side &&\n' span_id:1119) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side2 &&\n'
            span_id: 1120
          ) (Token id:Id.Lit_Chars val:'\t\tgit fetch alt &&\n' span_id:1121) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote prune alt &&\n' span_id:1122) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse --verify refs/remotes/origin/side &&\n'
            span_id: 1123
          ) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify refs/remotes/origin/side2\n' span_id:1124) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:1125)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1131)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1134)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1135)) 
              (OF)
            }
          here_end_span_id: 1139
          stdin_parts: [('some-tag\n')]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'add with reachable tags (default)' span_id:1144))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1148) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1149) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1150) 
          (Token id:Id.Lit_Chars val:'\t\t>foobar &&\n' span_id:1151) (Token id:Id.Lit_Chars val:'\t\tgit add foobar &&\n' span_id:1152) 
          (Token id:Id.Lit_Chars val:'\t\tgit commit -m "Foobar" &&\n' span_id:1153) (Token id:Id.Lit_Chars val:'\t\tgit tag -a -m "Foobar tag" foobar-tag &&\n' span_id:1154) 
          (Token id:Id.Lit_Chars val:'\t\tgit reset --hard HEAD~1 &&\n' span_id:1155) (Token id:Id.Lit_Chars val:'\t\tgit tag -a -m "Some tag" some-tag\n' span_id:1156) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1157) (Token id:Id.Lit_Chars val:'\tmkdir add-tags &&\n' span_id:1158) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1159) (Token id:Id.Lit_Chars val:'\t\tcd add-tags &&\n' span_id:1160) 
          (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:1161) (Token id:Id.Lit_Chars val:'\t\tgit remote add -f origin ../one &&\n' span_id:1162) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit tag -l some-tag >../test/output &&\n'
            span_id: 1163
          ) (Token id:Id.Lit_Chars val:'\t\tgit tag -l foobar-tag >>../test/output &&\n' span_id:1164) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git config remote.origin.tagopt\n'
            span_id: 1165
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1166) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp test/expect test/output\n' span_id:1167)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1173)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1176)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1177)) 
              (OF)
            }
          here_end_span_id: 1183
          stdin_parts: [('some-tag\n') ('foobar-tag\n') ('--tags\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add --tags' span_id:1188))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1192) 
          (Token id:Id.Lit_Chars val:'\trm -rf add-tags &&\n' span_id:1193) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1194) 
          (Token id:Id.Lit_Chars val:'\t\tmkdir add-tags &&\n' span_id:1195) (Token id:Id.Lit_Chars val:'\t\tcd add-tags &&\n' span_id:1196) 
          (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:1197) (Token id:Id.Lit_Chars val:'\t\tgit remote add -f --tags origin ../one &&\n' span_id:1198) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit tag -l some-tag >../test/output &&\n'
            span_id: 1199
          ) (Token id:Id.Lit_Chars val:'\t\tgit tag -l foobar-tag >>../test/output &&\n' span_id:1200) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remote.origin.tagopt >>../test/output\n'
            span_id: 1201
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1202) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp test/expect test/output\n' span_id:1203)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1209)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1212)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1213)) 
              (OF)
            }
          here_end_span_id: 1217
          stdin_parts: [('--no-tags\n')]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add --no-tags' span_id:1222))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1226) 
          (Token id:Id.Lit_Chars val:'\trm -rf add-tags &&\n' span_id:1227) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1228) 
          (Token id:Id.Lit_Chars val:'\t\tmkdir add-no-tags &&\n' span_id:1229) (Token id:Id.Lit_Chars val:'\t\tcd add-no-tags &&\n' span_id:1230) 
          (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:1231) (Token id:Id.Lit_Chars val:'\t\tgit remote add -f --no-tags origin ../one &&\n' span_id:1232) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit tag -l some-tag >../test/output &&\n'
            span_id: 1233
          ) (Token id:Id.Lit_Chars val:'\t\tgit tag -l foobar-tag >../test/output &&\n' span_id:1234) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remote.origin.tagopt >>../test/output\n'
            span_id: 1235
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1236) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1237) 
          (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1238) (Token id:Id.Lit_Chars val:'\t\tgit tag -d some-tag foobar-tag\n' span_id:1239) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1240) (Token id:Id.Lit_Chars val:'\ttest_cmp test/expect test/output\n' span_id:1241)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'reject --no-no-tags' span_id:1248))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1252) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1253) (Token id:Id.Lit_Chars val:'\t\tcd add-no-tags &&\n' span_id:1254) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git remote add -f --no-no-tags neworigin ../one\n'
            span_id: 1255
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1256)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1262)
          fd: -1
          arg_word: {(one/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1265)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1266)) 
              (OF)
            }
          here_end_span_id: 1274
          stdin_parts: [
            ('  apis/master\n')
            ('  apis/side\n')
            ('  drosophila/another\n')
            ('  drosophila/master\n')
            ('  drosophila/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:update span_id:1279))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1283) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1284) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1285) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add drosophila ../two &&\n'
            span_id: 1286
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote add apis ../mirror &&\n' span_id:1287) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote update &&\n' span_id:1288) (Token id:Id.Lit_Chars val:'\t\tgit branch -r >output &&\n' span_id:1289) 
          (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:1290) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1291)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1297)
          fd: -1
          arg_word: {(one/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1300)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1301)) 
              (OF)
            }
          here_end_span_id: 1311
          stdin_parts: [
            ('  drosophila/another\n')
            ('  drosophila/master\n')
            ('  drosophila/side\n')
            ('  manduca/master\n')
            ('  manduca/side\n')
            ('  megaloprepus/master\n')
            ('  megaloprepus/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'update with arguments' span_id:1316))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1320) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1321) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1322) 
          (Token id:Id.Lit_Chars val:'\t\tfor b in $(git branch -r)\n' span_id:1323) (Token id:Id.Lit_Chars val:'\t\tdo\n' span_id:1324) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r -d $b || exit 1\n' span_id:1325) (Token id:Id.Lit_Chars val:'\t\tdone &&\n' span_id:1326) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote add manduca ../mirror &&\n'
            span_id: 1327
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote add megaloprepus ../mirror &&\n' span_id:1328) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remotes.phobaeticus "drosophila megaloprepus" &&\n'
            span_id: 1329
          ) (Token id:Id.Lit_Chars val:'\t\tgit config remotes.titanus manduca &&\n' span_id:1330) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote update phobaeticus titanus &&\n'
            span_id: 1331
          ) (Token id:Id.Lit_Chars val:'\t\tgit branch -r >output &&\n' span_id:1332) 
          (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:1333) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1334)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'update --prune' span_id:1341))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1345) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1346) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1347) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -m side2 side3\n' span_id:1348) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1349) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1350) 
          (Token id:Id.Lit_Chars val:'\t\tcd test &&\n' span_id:1351) (Token id:Id.Lit_Chars val:'\t\tgit remote update --prune &&\n' span_id:1352) 
          (Token id:Id.Lit_Chars val:'\t\t(\n' span_id:1353) (Token id:Id.Lit_Chars val:'\t\t\tcd ../one &&\n' span_id:1354) 
          (Token id:Id.Lit_Chars val:'\t\t\tgit branch -m side3 side2\n' span_id:1355) (Token id:Id.Lit_Chars val:'\t\t) &&\n' span_id:1356) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit rev-parse refs/remotes/origin/side3 &&\n'
            span_id: 1357
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git rev-parse refs/remotes/origin/side2\n'
            span_id: 1358
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1359)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1365)
          fd: -1
          arg_word: {(one/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLessDash val:'<<-' span_id:1368)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1369)) 
              (OF)
            }
          here_end_span_id: 1378
          stdin_parts: [
            ('  apis/master\n')
            ('  apis/side\n')
            ('  manduca/master\n')
            ('  manduca/side\n')
            ('  megaloprepus/master\n')
            ('  megaloprepus/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'update default' span_id:1383))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1387) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1388) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1389) 
          (Token id:Id.Lit_Chars val:'\t\tfor b in $(git branch -r)\n' span_id:1390) (Token id:Id.Lit_Chars val:'\t\tdo\n' span_id:1391) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r -d $b || exit 1\n' span_id:1392) (Token id:Id.Lit_Chars val:'\t\tdone &&\n' span_id:1393) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remote.drosophila.skipDefaultUpdate true &&\n'
            span_id: 1394
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote update default &&\n' span_id:1395) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r >output &&\n' span_id:1396) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:1397) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:1398)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1404)
          fd: -1
          arg_word: {(one/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1407)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1408)) 
              (OF)
            }
          here_end_span_id: 1414
          stdin_parts: [('  drosophila/another\n') ('  drosophila/master\n') ('  drosophila/side\n')]
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'update default (overridden, with funny whitespace)'
            span_id: 1419
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1423) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1424) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1425) 
          (Token id:Id.Lit_Chars val:'\t\tfor b in $(git branch -r)\n' span_id:1426) (Token id:Id.Lit_Chars val:'\t\tdo\n' span_id:1427) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r -d $b || exit 1\n' span_id:1428) (Token id:Id.Lit_Chars val:'\t\tdone &&\n' span_id:1429) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remotes.default "$(printf "\\t drosophila  \\n")" &&\n'
            span_id: 1430
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote update default &&\n' span_id:1431) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r >output &&\n' span_id:1432) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:1433) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:1434)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'update (with remotes.default defined)' span_id:1441))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1445) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1446) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1447) 
          (Token id:Id.Lit_Chars val:'\t\tfor b in $(git branch -r)\n' span_id:1448) (Token id:Id.Lit_Chars val:'\t\tdo\n' span_id:1449) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r -d $b || exit 1\n' span_id:1450) (Token id:Id.Lit_Chars val:'\t\tdone &&\n' span_id:1451) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remotes.default "drosophila" &&\n'
            span_id: 1452
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote update &&\n' span_id:1453) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -r >output &&\n' span_id:1454) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:1455) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:1456)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'"remote show" does not show symbolic refs' span_id:1463))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1467) 
          (Token id:Id.Lit_Chars val:'\tgit clone one three &&\n' span_id:1468) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1469) 
          (Token id:Id.Lit_Chars val:'\t\tcd three &&\n' span_id:1470) (Token id:Id.Lit_Chars val:'\t\tgit remote show origin >output &&\n' span_id:1471) 
          (Token id:Id.Lit_Chars val:'\t\t! grep "^ *HEAD$" < output &&\n' span_id:1472) (Token id:Id.Lit_Chars val:'\t\t! grep -i stale < output\n' span_id:1473) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:1474)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'reject adding remote with an invalid name' span_id:1481))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1485) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote add some:url desired-name\n'
            span_id: 1486
          )
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename a remote' span_id:1500))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1504) 
          (Token id:Id.Lit_Chars val:'\tgit clone one four &&\n' span_id:1505) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1506) 
          (Token id:Id.Lit_Chars val:'\t\tcd four &&\n' span_id:1507) (Token id:Id.Lit_Chars val:'\t\tgit remote rename origin upstream &&\n' span_id:1508) 
          (Token
            id: Id.Lit_Chars
            val: '\t\trmdir .git/refs/remotes/origin &&\n'
            span_id: 1509
          ) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\ttest "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/master" &&\n'
            span_id: 1510
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git rev-parse upstream/master)" = "$(git rev-parse master)" &&\n'
            span_id: 1511
          ) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\ttest "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*" &&\n'
            span_id: 1512
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git config branch.master.remote)" = "upstream"\n'
            span_id: 1513
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1514)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'rename does not update a non-default fetch refspec'
            span_id: 1521
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1525) 
          (Token id:Id.Lit_Chars val:'\tgit clone one four.one &&\n' span_id:1526) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1527) 
          (Token id:Id.Lit_Chars val:'\t\tcd four.one &&\n' span_id:1528) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&\n'
            span_id: 1529
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote rename origin upstream &&\n' span_id:1530) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\ttest "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/heads/origin/*" &&\n'
            span_id: 1531
          ) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse -q origin/master\n' span_id:1532) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:1533)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'rename a remote with name part of fetch spec' span_id:1540))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1544) 
          (Token id:Id.Lit_Chars val:'\tgit clone one four.two &&\n' span_id:1545) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1546) 
          (Token id:Id.Lit_Chars val:'\t\tcd four.two &&\n' span_id:1547) (Token id:Id.Lit_Chars val:'\t\tgit remote rename origin remote &&\n' span_id:1548) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote rename remote upstream &&\n'
            span_id: 1549
          ) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\ttest "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*"\n'
            span_id: 1550
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1551)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'rename a remote with name prefix of other remote'
            span_id: 1558
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1562) 
          (Token id:Id.Lit_Chars val:'\tgit clone one four.three &&\n' span_id:1563) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1564) 
          (Token id:Id.Lit_Chars val:'\t\tcd four.three &&\n' span_id:1565) (Token id:Id.Lit_Chars val:'\t\tgit remote add o git://example.com/repo.git &&\n' span_id:1566) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote rename o upstream &&\n' span_id:1567) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git rev-parse origin/master)" = "$(git rev-parse master)"\n'
            span_id: 1568
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1569)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:1575)
          fd: -1
          arg_word: {(remotes_origin)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:1578)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 1591
          stdin_parts: [
            ('URL: ')
            (command_sub
              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1582)
              command_list: (command.CommandList children:[(C {(pwd)})])
            )
            ('/one\n')
            ('Push: refs/heads/master:refs/heads/upstream\n')
            ('Push: refs/heads/next:refs/heads/upstream2\n')
            ('Pull: refs/heads/master:refs/heads/origin\n')
            ('Pull: refs/heads/next:refs/heads/origin2\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'migrate a remote from named file in $GIT_DIR/remotes'
            span_id: 1596
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1600) 
          (Token id:Id.Lit_Chars val:'\tgit clone one five &&\n' span_id:1601) (Token id:Id.Lit_Chars val:'\torigin_url=$(pwd)/one &&\n' span_id:1602) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1603) (Token id:Id.Lit_Chars val:'\t\tcd five &&\n' span_id:1604) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote remove origin &&\n' span_id:1605) (Token id:Id.Lit_Chars val:'\t\tmkdir -p .git/remotes &&\n' span_id:1606) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tcat ../remotes_origin >.git/remotes/origin &&\n'
            span_id: 1607
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote rename origin origin &&\n' span_id:1608) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_path_is_missing .git/remotes/origin &&\n'
            span_id: 1609
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git config remote.origin.url)" = "$origin_url" &&\n'
            span_id: 1610
          ) (Token id:Id.Lit_Chars val:'\t\tcat >push_expected <<-\\EOF &&\n' span_id:1611) 
          (Token
            id: Id.Lit_Chars
            val: '\t\trefs/heads/master:refs/heads/upstream\n'
            span_id: 1612
          ) (Token id:Id.Lit_Chars val:'\t\trefs/heads/next:refs/heads/upstream2\n' span_id:1613) 
          (Token id:Id.Lit_Chars val:'\t\tEOF\n' span_id:1614) (Token id:Id.Lit_Chars val:'\t\tcat >fetch_expected <<-\\EOF &&\n' span_id:1615) 
          (Token
            id: Id.Lit_Chars
            val: '\t\trefs/heads/master:refs/heads/origin\n'
            span_id: 1616
          ) (Token id:Id.Lit_Chars val:'\t\trefs/heads/next:refs/heads/origin2\n' span_id:1617) 
          (Token id:Id.Lit_Chars val:'\t\tEOF\n' span_id:1618) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.origin.push >push_actual &&\n'
            span_id: 1619
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.origin.fetch >fetch_actual &&\n'
            span_id: 1620
          ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp push_expected push_actual &&\n' span_id:1621) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_cmp fetch_expected fetch_actual\n'
            span_id: 1622
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1623)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'migrate a remote from named file in $GIT_DIR/branches'
            span_id: 1630
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1634) 
          (Token id:Id.Lit_Chars val:'\tgit clone one six &&\n' span_id:1635) (Token id:Id.Lit_Chars val:'\torigin_url=$(pwd)/one &&\n' span_id:1636) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1637) (Token id:Id.Lit_Chars val:'\t\tcd six &&\n' span_id:1638) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote rm origin &&\n' span_id:1639) (Token id:Id.Lit_Chars val:'\t\techo "$origin_url" >.git/branches/origin &&\n' span_id:1640) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote rename origin origin &&\n'
            span_id: 1641
          ) (Token id:Id.Lit_Chars val:'\t\ttest_path_is_missing .git/branches/origin &&\n' span_id:1642) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git config remote.origin.url)" = "$origin_url" &&\n'
            span_id: 1643
          ) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\ttest "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin" &&\n'
            span_id: 1644
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git config remote.origin.push)" = "HEAD:refs/heads/master"\n'
            span_id: 1645
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1646)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'migrate a remote from named file in $GIT_DIR/branches (2)'
            span_id: 1653
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1657) 
          (Token id:Id.Lit_Chars val:'\tgit clone one seven &&\n' span_id:1658) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1659) 
          (Token id:Id.Lit_Chars val:'\t\tcd seven &&\n' span_id:1660) (Token id:Id.Lit_Chars val:'\t\tgit remote rm origin &&\n' span_id:1661) 
          (Token
            id: Id.Lit_Chars
            val: '\t\techo "quux#foom" > .git/branches/origin &&\n'
            span_id: 1662
          ) (Token id:Id.Lit_Chars val:'\t\tgit remote rename origin origin &&\n' span_id:1663) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_path_is_missing .git/branches/origin &&\n'
            span_id: 1664
          ) (Token id:Id.Lit_Chars val:'\t\ttest "$(git config remote.origin.url)" = "quux" &&\n' span_id:1665) 
          (Token
            id: Id.Lit_Chars
            val: 
'\t\ttest "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin"\n'
            span_id: 1666
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest "$(git config remote.origin.push)" = "HEAD:refs/heads/foom"\n'
            span_id: 1667
          ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1668)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote prune to cause a dangling symref' span_id:1675))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1679) 
          (Token id:Id.Lit_Chars val:'\tgit clone one eight &&\n' span_id:1680) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1681) 
          (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:1682) (Token id:Id.Lit_Chars val:'\t\tgit checkout side2 &&\n' span_id:1683) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch -D master\n' span_id:1684) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1685) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1686) 
          (Token id:Id.Lit_Chars val:'\t\tcd eight &&\n' span_id:1687) (Token id:Id.Lit_Chars val:'\t\tgit remote prune origin\n' span_id:1688) 
          (Token id:Id.Lit_Chars val:'\t) >err 2>&1 &&\n' span_id:1689) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "has become dangling" err &&\n' span_id:1690) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1691) 
          (Token
            id: Id.Lit_Chars
            val: '\t: And the dangling symref will not cause other annoying errors &&\n'
            span_id: 1692
          ) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1693) 
          (Token id:Id.Lit_Chars val:'\t\tcd eight &&\n' span_id:1694) (Token id:Id.Lit_Chars val:'\t\tgit branch -a\n' span_id:1695) 
          (Token id:Id.Lit_Chars val:'\t) 2>err &&\n' span_id:1696) (Token id:Id.Lit_Chars val:'\t! grep "points nowhere" err &&\n' span_id:1697) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1698) (Token id:Id.Lit_Chars val:'\t\tcd eight &&\n' span_id:1699) 
          (Token
            id: Id.Lit_Chars
            val: '\t\ttest_must_fail git branch nomore origin\n'
            span_id: 1700
          ) (Token id:Id.Lit_Chars val:'\t) 2>err &&\n' span_id:1701) 
          (Token id:Id.Lit_Chars val:'\tgrep "dangling symref" err\n' span_id:1702)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'show empty remote' span_id:1709))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1713) 
          (Token id:Id.Lit_Chars val:'\ttest_create_repo empty &&\n' span_id:1714) (Token id:Id.Lit_Chars val:'\tgit clone empty empty-clone &&\n' span_id:1715) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1716) (Token id:Id.Lit_Chars val:'\t\tcd empty-clone &&\n' span_id:1717) 
          (Token id:Id.Lit_Chars val:'\t\tgit remote show origin\n' span_id:1718) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1719)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-branches requires a remote' span_id:1726))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1730) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote set-branches &&\n'
            span_id: 1731
          ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git remote set-branches --add\n' span_id:1732)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'remote set-branches' span_id:1739))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1743) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "+refs/heads/*:refs/remotes/scratch/*" >expect.initial &&\n'
            span_id: 1744
          ) (Token id:Id.Lit_Chars val:'\tsort <<-\\EOF >expect.add &&\n' span_id:1745) 
          (Token
            id: Id.Lit_Chars
            val: '\t+refs/heads/*:refs/remotes/scratch/*\n'
            span_id: 1746
          ) (Token id:Id.Lit_Chars val:'\t+refs/heads/other:refs/remotes/scratch/other\n' span_id:1747) 
          (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1748) (Token id:Id.Lit_Chars val:'\tsort <<-\\EOF >expect.replace &&\n' span_id:1749) 
          (Token
            id: Id.Lit_Chars
            val: '\t+refs/heads/maint:refs/remotes/scratch/maint\n'
            span_id: 1750
          ) (Token id:Id.Lit_Chars val:'\t+refs/heads/master:refs/remotes/scratch/master\n' span_id:1751) 
          (Token
            id: Id.Lit_Chars
            val: '\t+refs/heads/next:refs/remotes/scratch/next\n'
            span_id: 1752
          ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1753) 
          (Token id:Id.Lit_Chars val:'\tsort <<-\\EOF >expect.add-two &&\n' span_id:1754) (Token id:Id.Lit_Chars val:'\t+refs/heads/maint:refs/remotes/scratch/maint\n' span_id:1755) 
          (Token
            id: Id.Lit_Chars
            val: '\t+refs/heads/master:refs/remotes/scratch/master\n'
            span_id: 1756
          ) (Token id:Id.Lit_Chars val:'\t+refs/heads/next:refs/remotes/scratch/next\n' span_id:1757) 
          (Token
            id: Id.Lit_Chars
            val: '\t+refs/heads/pu:refs/remotes/scratch/pu\n'
            span_id: 1758
          ) (Token id:Id.Lit_Chars val:'\t+refs/heads/t/topic:refs/remotes/scratch/t/topic\n' span_id:1759) 
          (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1760) (Token id:Id.Lit_Chars val:'\tsort <<-\\EOF >expect.setup-ffonly &&\n' span_id:1761) 
          (Token
            id: Id.Lit_Chars
            val: '\trefs/heads/master:refs/remotes/scratch/master\n'
            span_id: 1762
          ) (Token id:Id.Lit_Chars val:'\t+refs/heads/next:refs/remotes/scratch/next\n' span_id:1763) 
          (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1764) (Token id:Id.Lit_Chars val:'\tsort <<-\\EOF >expect.respect-ffonly &&\n' span_id:1765) 
          (Token
            id: Id.Lit_Chars
            val: '\trefs/heads/master:refs/remotes/scratch/master\n'
            span_id: 1766
          ) (Token id:Id.Lit_Chars val:'\t+refs/heads/next:refs/remotes/scratch/next\n' span_id:1767) 
          (Token
            id: Id.Lit_Chars
            val: '\t+refs/heads/pu:refs/remotes/scratch/pu\n'
            span_id: 1768
          ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1769) (Token id:Id.Lit_Chars val:'\n' span_id:1770) 
          (Token id:Id.Lit_Chars val:'\tgit clone .git/ setbranches &&\n' span_id:1771) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1772) 
          (Token id:Id.Lit_Chars val:'\t\tcd setbranches &&\n' span_id:1773) (Token id:Id.Lit_Chars val:'\t\tgit remote rename origin scratch &&\n' span_id:1774) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >config-result &&\n'
            span_id: 1775
          ) (Token id:Id.Lit_Chars val:'\t\tsort <config-result >../actual.initial &&\n' span_id:1776) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1777) (Token id:Id.Lit_Chars val:'\t\tgit remote set-branches scratch --add other &&\n' span_id:1778) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >config-result &&\n'
            span_id: 1779
          ) (Token id:Id.Lit_Chars val:'\t\tsort <config-result >../actual.add &&\n' span_id:1780) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1781) (Token id:Id.Lit_Chars val:'\t\tgit remote set-branches scratch maint master next &&\n' span_id:1782) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >config-result &&\n'
            span_id: 1783
          ) (Token id:Id.Lit_Chars val:'\t\tsort <config-result >../actual.replace &&\n' span_id:1784) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1785) (Token id:Id.Lit_Chars val:'\t\tgit remote set-branches --add scratch pu t/topic &&\n' span_id:1786) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >config-result &&\n'
            span_id: 1787
          ) (Token id:Id.Lit_Chars val:'\t\tsort <config-result >../actual.add-two &&\n' span_id:1788) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1789) (Token id:Id.Lit_Chars val:'\t\tgit config --unset-all remote.scratch.fetch &&\n' span_id:1790) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config remote.scratch.fetch \\\n'
            span_id: 1791
          ) (Token id:Id.Lit_Chars val:'\t\t\trefs/heads/master:refs/remotes/scratch/master &&\n' span_id:1792) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --add remote.scratch.fetch \\\n'
            span_id: 1793
          ) (Token id:Id.Lit_Chars val:'\t\t\t+refs/heads/next:refs/remotes/scratch/next &&\n' span_id:1794) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >config-result &&\n'
            span_id: 1795
          ) (Token id:Id.Lit_Chars val:'\t\tsort <config-result >../actual.setup-ffonly &&\n' span_id:1796) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1797) (Token id:Id.Lit_Chars val:'\t\tgit remote set-branches --add scratch pu &&\n' span_id:1798) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >config-result &&\n'
            span_id: 1799
          ) (Token id:Id.Lit_Chars val:'\t\tsort <config-result >../actual.respect-ffonly\n' span_id:1800) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1801) (Token id:Id.Lit_Chars val:'\ttest_cmp expect.initial actual.initial &&\n' span_id:1802) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expect.add actual.add &&\n' span_id:1803) (Token id:Id.Lit_Chars val:'\ttest_cmp expect.replace actual.replace &&\n' span_id:1804) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_cmp expect.add-two actual.add-two &&\n'
            span_id: 1805
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect.setup-ffonly actual.setup-ffonly &&\n' span_id:1806) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_cmp expect.respect-ffonly actual.respect-ffonly\n'
            span_id: 1807
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-branches with --mirror' span_id:1814))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1818) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "+refs/*:refs/*" >expect.initial &&\n'
            span_id: 1819
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "+refs/heads/master:refs/heads/master" >expect.replace &&\n'
            span_id: 1820
          ) (Token id:Id.Lit_Chars val:'\tgit clone --mirror .git/ setbranches-mirror &&\n' span_id:1821) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:1822) (Token id:Id.Lit_Chars val:'\t\tcd setbranches-mirror &&\n' span_id:1823) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote rename origin scratch &&\n'
            span_id: 1824
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >../actual.initial &&\n'
            span_id: 1825
          ) (Token id:Id.Lit_Chars val:'\n' span_id:1826) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit remote set-branches scratch heads/master &&\n'
            span_id: 1827
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config --get-all remote.scratch.fetch >../actual.replace\n'
            span_id: 1828
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1829) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_cmp expect.initial actual.initial &&\n'
            span_id: 1830
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect.replace actual.replace\n' span_id:1831)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'new remote' span_id:1838))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1842) 
          (Token id:Id.Lit_Chars val:'\tgit remote add someremote foo &&\n' span_id:1843) (Token id:Id.Lit_Chars val:'\techo foo >expect &&\n' span_id:1844) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >actual &&\n'
            span_id: 1845
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:1846)
        )
      }
    )
    (command.ShFunction
      name: get_url_test
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [{(cat)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:1860)
                      fd: -1
                      arg_word: {(expect)}
                    )
                  ]
                )
                (command.Simple
                  words: [{(git)} {(remote)} {(get-url)} {(DQ ($ Id.VSub_At '$@'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:1876)
                      fd: -1
                      arg_word: {(actual)}
                    )
                  ]
                )
                (C {(test_cmp)} {(expect)} {(actual)})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get-url on new remote' span_id:1894))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1898) 
          (Token
            id: Id.Lit_Chars
            val: '\techo foo | get_url_test someremote &&\n'
            span_id: 1899
          ) (Token id:Id.Lit_Chars val:'\techo foo | get_url_test --all someremote &&\n' span_id:1900) 
          (Token
            id: Id.Lit_Chars
            val: '\techo foo | get_url_test --push someremote &&\n'
            span_id: 1901
          ) (Token id:Id.Lit_Chars val:'\techo foo | get_url_test --push --all someremote\n' span_id:1902)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url with locked config' span_id:1909))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1913) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_when_finished "rm -f .git/config.lock" &&\n'
            span_id: 1914
          ) (Token id:Id.Lit_Chars val:'\tgit config --get-all remote.someremote.url >expect &&\n' span_id:1915) 
          (Token id:Id.Lit_Chars val:'\t>.git/config.lock &&\n' span_id:1916) (Token id:Id.Lit_Chars val:'\ttest_must_fail git remote set-url someremote baz &&\n' span_id:1917) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >actual &&\n'
            span_id: 1918
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:1919)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'remote set-url bar' span_id:1926))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1930) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url someremote bar &&\n'
            span_id: 1931
          ) (Token id:Id.Lit_Chars val:'\techo bar >expect &&\n' span_id:1932) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >actual &&\n'
            span_id: 1933
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:1934)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'remote set-url baz bar' span_id:1941))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1945) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url someremote baz bar &&\n'
            span_id: 1946
          ) (Token id:Id.Lit_Chars val:'\techo baz >expect &&\n' span_id:1947) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >actual &&\n'
            span_id: 1948
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:1949)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'remote set-url zot bar' span_id:1956))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1960) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote set-url someremote zot bar &&\n'
            span_id: 1961
          ) (Token id:Id.Lit_Chars val:'\techo baz >expect &&\n' span_id:1962) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >actual &&\n'
            span_id: 1963
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:1964)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push zot baz' span_id:1971))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1975) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote set-url --push someremote zot baz &&\n'
            span_id: 1976
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:1977) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:1978) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 1979
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:1980) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 1981
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:1982)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push zot' span_id:1989))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1993) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push someremote zot &&\n'
            span_id: 1994
          ) (Token id:Id.Lit_Chars val:'\techo zot >expect &&\n' span_id:1995) 
          (Token id:Id.Lit_Chars val:'\techo "YYY" >>expect &&\n' span_id:1996) (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:1997) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 1998
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:1999) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2000
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2001)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'get-url with different urls' span_id:2008))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2012) 
          (Token
            id: Id.Lit_Chars
            val: '\techo baz | get_url_test someremote &&\n'
            span_id: 2013
          ) (Token id:Id.Lit_Chars val:'\techo baz | get_url_test --all someremote &&\n' span_id:2014) 
          (Token
            id: Id.Lit_Chars
            val: '\techo zot | get_url_test --push someremote &&\n'
            span_id: 2015
          ) (Token id:Id.Lit_Chars val:'\techo zot | get_url_test --push --all someremote\n' span_id:2016)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push qux zot' span_id:2023))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2027) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push someremote qux zot &&\n'
            span_id: 2028
          ) (Token id:Id.Lit_Chars val:'\techo qux >expect &&\n' span_id:2029) 
          (Token id:Id.Lit_Chars val:'\techo "YYY" >>expect &&\n' span_id:2030) (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2031) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2032
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2033) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2034
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2035)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push foo qu+x' span_id:2042))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2046) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push someremote foo qu+x &&\n'
            span_id: 2047
          ) (Token id:Id.Lit_Chars val:'\techo foo >expect &&\n' span_id:2048) 
          (Token id:Id.Lit_Chars val:'\techo "YYY" >>expect &&\n' span_id:2049) (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2050) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2051
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2052) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2053
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2054)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push --add aaa' span_id:2061))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2065) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push --add someremote aaa &&\n'
            span_id: 2066
          ) (Token id:Id.Lit_Chars val:'\techo foo >expect &&\n' span_id:2067) 
          (Token id:Id.Lit_Chars val:'\techo aaa >>expect &&\n' span_id:2068) (Token id:Id.Lit_Chars val:'\techo "YYY" >>expect &&\n' span_id:2069) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2070) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2071
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2072) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2073
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2074)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'get-url on multi push remote' span_id:2081))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2085) 
          (Token
            id: Id.Lit_Chars
            val: '\techo foo | get_url_test --push someremote &&\n'
            span_id: 2086
          ) (Token id:Id.Lit_Chars val:'\tget_url_test --push --all someremote <<-\\EOF\n' span_id:2087) 
          (Token id:Id.Lit_Chars val:'\tfoo\n' span_id:2088) (Token id:Id.Lit_Chars val:'\taaa\n' span_id:2089) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2090)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push bar aaa' span_id:2097))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2101) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push someremote bar aaa &&\n'
            span_id: 2102
          ) (Token id:Id.Lit_Chars val:'\techo foo >expect &&\n' span_id:2103) 
          (Token id:Id.Lit_Chars val:'\techo bar >>expect &&\n' span_id:2104) (Token id:Id.Lit_Chars val:'\techo "YYY" >>expect &&\n' span_id:2105) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2106) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2107
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2108) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2109
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2110)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push --delete bar' span_id:2117))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2121) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push --delete someremote bar &&\n'
            span_id: 2122
          ) (Token id:Id.Lit_Chars val:'\techo foo >expect &&\n' span_id:2123) 
          (Token id:Id.Lit_Chars val:'\techo "YYY" >>expect &&\n' span_id:2124) (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2125) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2126
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2127) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2128
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2129)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --push --delete foo' span_id:2136))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2140) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --push --delete someremote foo &&\n'
            span_id: 2141
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2142) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2143) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2144
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2145) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2146
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2147)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --add bbb' span_id:2154))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2158) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --add someremote bbb &&\n'
            span_id: 2159
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2160) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2161) (Token id:Id.Lit_Chars val:'\techo bbb >>expect &&\n' span_id:2162) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2163
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2164) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2165
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2166)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'get-url on multi fetch remote' span_id:2173))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2177) 
          (Token
            id: Id.Lit_Chars
            val: '\techo baz | get_url_test someremote &&\n'
            span_id: 2178
          ) (Token id:Id.Lit_Chars val:'\tget_url_test --all someremote <<-\\EOF\n' span_id:2179) 
          (Token id:Id.Lit_Chars val:'\tbaz\n' span_id:2180) (Token id:Id.Lit_Chars val:'\tbbb\n' span_id:2181) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2182)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --delete .*' span_id:2189))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2193) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote set-url --delete someremote .\\* &&\n'
            span_id: 2194
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2195) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2196) (Token id:Id.Lit_Chars val:'\techo bbb >>expect &&\n' span_id:2197) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2198
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2199) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2200
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2201)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --delete bbb' span_id:2208))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2212) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --delete someremote bbb &&\n'
            span_id: 2213
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2214) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2215) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2216
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2217) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2218
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2219)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --delete baz' span_id:2226))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2230) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git remote set-url --delete someremote baz &&\n'
            span_id: 2231
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2232) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2233) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2234
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2235) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2236
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2237)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --add ccc' span_id:2244))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2248) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --add someremote ccc &&\n'
            span_id: 2249
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2250) 
          (Token id:Id.Lit_Chars val:'\techo baz >>expect &&\n' span_id:2251) (Token id:Id.Lit_Chars val:'\techo ccc >>expect &&\n' span_id:2252) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2253
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2254) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2255
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2256)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'remote set-url --delete baz' span_id:2263))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2267) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit remote set-url --delete someremote baz &&\n'
            span_id: 2268
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >expect &&\n' span_id:2269) 
          (Token id:Id.Lit_Chars val:'\techo ccc >>expect &&\n' span_id:2270) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git config --get-all remote.someremote.pushurl >actual &&\n'
            span_id: 2271
          ) (Token id:Id.Lit_Chars val:'\techo "YYY" >>actual &&\n' span_id:2272) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config --get-all remote.someremote.url >>actual &&\n'
            span_id: 2273
          ) (Token id:Id.Lit_Chars val:'\tcmp expect actual\n' span_id:2274)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'extra args: setup' span_id:2281))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2285) 
          (Token
            id: Id.Lit_Chars
            val: '\t# add a dummy origin so that this does not trigger failure\n'
            span_id: 2286
          ) (Token id:Id.Lit_Chars val:'\tgit remote add origin .\n' span_id:2287)
        )
      }
    )
    (command.ShFunction
      name: test_extra_arg
      body: 
        (command.BraceGroup
          children: [
            (C {(test_expect_success)} {(DQ ('extra args: ') ($ Id.VSub_Star '$*'))} 
              {
                (DQ ('\n') ('\t\ttest_must_fail git remote ') ($ Id.VSub_Star '$*') 
                  (' bogus_extra_arg 2>actual &&\n') ("\t\ttest_i18ngrep '^usage:' actual\n") ('\t')
                )
              }
            )
          ]
        )
    )
    (C {(test_extra_arg)} {(add)} {(nick)} {(url)})
    (C {(test_extra_arg)} {(rename)} {(origin)} {(newname)})
    (C {(test_extra_arg)} {(remove)} {(origin)})
    (C {(test_extra_arg)} {(set-head)} {(origin)} {(master)})
    (C {(test_extra_arg)} {(get-url)} {(origin)} {(newurl)})
    (C {(test_extra_arg)} {(set-url)} {(origin)} {(newurl)} {(oldurl)})
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'add remote matching the "insteadOf" URL' span_id:2382))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2386) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config url.xyz@example.com.insteadOf backup &&\n'
            span_id: 2387
          ) (Token id:Id.Lit_Chars val:'\tgit remote add backup xyz@example.com\n' span_id:2388)
        )
      }
    )
    (C {(test_done)})
  ]
)