(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_description='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_description='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'remote tracking stats'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <advance>
      name: advance
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_Number 1))}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<add>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_tick>
                  more_env: []
                  words: [{<test_tick>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<commit>} {<-m>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<setup>}
        {
          (SQ <'\n'> <'\tadvance a &&\n'> <'\tadvance b &&\n'> <'\tadvance c &&\n'> 
            <'\tgit clone . test &&\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout -b b1 origin &&\n'> 
            <'\t\tgit reset --hard HEAD^ &&\n'> <'\t\tadvance d &&\n'> <'\t\tgit checkout -b b2 origin &&\n'> <'\t\tgit reset --hard b1 &&\n'> 
            <'\t\tgit checkout -b b3 origin &&\n'> <'\t\tgit reset --hard HEAD^ &&\n'> <'\t\tgit checkout -b b4 origin &&\n'> <'\t\tadvance e &&\n'> 
            <'\t\tadvance f &&\n'> <'\t\tgit checkout -b brokenbase origin &&\n'> <'\t\tgit checkout -b b5 --track brokenbase &&\n'> 
            <'\t\tadvance g &&\n'> <'\t\tgit branch -d brokenbase &&\n'> <'\t\tgit checkout -b b6 origin\n'> <'\t) &&\n'> 
            <'\tgit checkout -b follower --track master &&\n'> <'\tadvance h\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'script='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'script='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'script='> name:script)
          op: assign_op.Equal
          rhs: {(SQ <'s/^..\\(b.\\) *[0-9a-f]* \\(.*\\)$/\\1 \\2/p'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'b1 [ahead 1, behind 1] d\n'>
                <'b2 [ahead 1, behind 1] d\n'>
                <'b3 [behind 1] b\n'>
                <'b4 [ahead 2] f\n'>
                <'b5 g\n'>
                <'b6 c\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'branch -v'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit branch -v\n'> <'\t) |\n'> 
            <'\tsed -n -e "$script" >actual &&\n'> <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'b1 [origin/master: ahead 1, behind 1] d\n'>
                <'b2 [origin/master: ahead 1, behind 1] d\n'>
                <'b3 [origin/master: behind 1] b\n'>
                <'b4 [origin/master: ahead 2] f\n'>
                <'b5 [brokenbase: gone] g\n'>
                <'b6 [origin/master] c\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'branch -vv'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit branch -vv\n'> <'\t) |\n'> 
            <'\tsed -n -e "$script" >actual &&\n'> <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout (diverged from upstream)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test && git checkout b1\n'> <'\t) >actual &&\n'> 
            <'\ttest_i18ngrep "have 1 and 1 different" actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout with local tracked branch'>)}
        {
          (SQ <'\n'> <'\tgit checkout master &&\n'> <'\tgit checkout follower >actual &&\n'> 
            <'\ttest_i18ngrep "is ahead of" actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout (upstream is gone)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b5\n'> <'\t) >actual &&\n'> 
            <'\ttest_i18ngrep "is based on .*, but the upstream is gone." actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout (up-to-date with upstream)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test && git checkout b6\n'> <'\t) >actual &&\n'> 
            <'\ttest_i18ngrep "Your branch is up-to-date with .origin/master" actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'status (diverged from upstream)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b1 >/dev/null &&\n'> 
            <'\t\t# reports nothing to commit\n'> <'\t\ttest_must_fail git commit --dry-run\n'> <'\t) >actual &&\n'> 
            <'\ttest_i18ngrep "have 1 and 1 different" actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'status (upstream is gone)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b5 >/dev/null &&\n'> 
            <'\t\t# reports nothing to commit\n'> <'\t\ttest_must_fail git commit --dry-run\n'> <'\t) >actual &&\n'> 
            <'\ttest_i18ngrep "is based on .*, but the upstream is gone." actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'status (up-to-date with upstream)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b6 >/dev/null &&\n'> 
            <'\t\t# reports nothing to commit\n'> <'\t\ttest_must_fail git commit --dry-run\n'> <'\t) >actual &&\n'> 
            <'\ttest_i18ngrep "Your branch is up-to-date with .origin/master" actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [<'## b1...origin/master [ahead 1, behind 1]\n'>]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'status -s -b (diverged from upstream)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b1 >/dev/null &&\n'> 
            <'\t\tgit status -s -b | head -1\n'> <'\t) >actual &&\n'> <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [<'## b5...brokenbase [gone]\n'>]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'status -s -b (upstream is gone)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b5 >/dev/null &&\n'> 
            <'\t\tgit status -s -b | head -1\n'> <'\t) >actual &&\n'> <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [<'## b6...origin/master\n'>]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'status -s -b (up-to-date with upstream)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd test &&\n'> <'\t\tgit checkout b6 >/dev/null &&\n'> 
            <'\t\tgit status -s -b | head -1\n'> <'\t) >actual &&\n'> <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fail to track lightweight tags'>)}
        {
          (SQ <'\n'> <'\tgit checkout master &&\n'> <'\tgit tag light &&\n'> 
            <'\ttest_must_fail git branch --track lighttrack light >actual &&\n'> <'\ttest_i18ngrep ! "set up to track" actual &&\n'> <'\ttest_must_fail git checkout lighttrack\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fail to track annotated tags'>)}
        {
          (SQ <'\n'> <'\tgit checkout master &&\n'> <'\tgit tag -m heavy heavy &&\n'> 
            <'\ttest_must_fail git branch --track heavytrack heavy >actual &&\n'> <'\ttest_i18ngrep ! "set up to track" actual &&\n'> <'\ttest_must_fail git checkout heavytrack\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup tracking with branch --set-upstream on existing branch'>)}
        {
          (SQ <'\n'> <'\tgit branch from-master master &&\n'> 
            <'\ttest_must_fail git config branch.from-master.merge > actual &&\n'> <'\tgit branch --set-upstream from-master master &&\n'> 
            <'\tgit config branch.from-master.merge > actual &&\n'> <'\tgrep -q "^refs/heads/master$" actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--set-upstream does not change branch'>)}
        {
          (SQ <'\n'> <'\tgit branch from-master2 master &&\n'> 
            <'\ttest_must_fail git config branch.from-master2.merge > actual &&\n'> <'\tgit rev-list from-master2 &&\n'> <'\tgit update-ref refs/heads/from-master2 from-master2^ &&\n'> 
            <'\tgit rev-parse from-master2 >expect2 &&\n'> <'\tgit branch --set-upstream from-master2 master &&\n'> 
            <'\tgit config branch.from-master.merge > actual &&\n'> <'\tgit rev-parse from-master2 >actual2 &&\n'> <'\tgrep -q "^refs/heads/master$" actual &&\n'> 
            <'\tcmp expect2 actual2\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--set-upstream @{-1}'>)}
        {
          (SQ <'\n'> <'\tgit checkout from-master &&\n'> <'\tgit checkout from-master2 &&\n'> 
            <'\tgit config branch.from-master2.merge > expect2 &&\n'> <'\tgit branch --set-upstream @{-1} follower &&\n'> 
            <'\tgit config branch.from-master.merge > actual &&\n'> <'\tgit config branch.from-master2.merge > actual2 &&\n'> 
            <'\tgit branch --set-upstream from-master follower &&\n'> <'\tgit config branch.from-master.merge > expect &&\n'> <'\ttest_cmp expect2 actual2 &&\n'> 
            <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)