(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 <'See why rewinding head breaks send-pack\n'> <'\n'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'cnt='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'cnt='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cnt='> name:cnt)
          op: assign_op.Equal
          rhs: {<64>}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<setup>}
        {
          (SQ <'\n'> <'\ttest_tick &&\n'> <'\tmkdir mozart mozart/is &&\n'> 
            <'\techo "Commit #0" >mozart/is/pink &&\n'> <'\tgit update-index --add mozart/is/pink &&\n'> <'\ttree=$(git write-tree) &&\n'> 
            <'\tcommit=$(echo "Commit #0" | git commit-tree $tree) &&\n'> <'\tzero=$commit &&\n'> <'\tparent=$zero &&\n'> <'\ti=0 &&\n'> <'\twhile test $i -le $cnt\n'> <'\tdo\n'> 
            <'\t    i=$(($i+1)) &&\n'> <'\t    test_tick &&\n'> <'\t    echo "Commit #$i" >mozart/is/pink &&\n'> 
            <'\t    git update-index --add mozart/is/pink &&\n'> <'\t    tree=$(git write-tree) &&\n'> 
            <'\t    commit=$(echo "Commit #$i" | git commit-tree $tree -p $parent) &&\n'> <'\t    git update-ref refs/tags/commit$i $commit &&\n'> <'\t    parent=$commit || return 1\n'> 
            <'\tdone &&\n'> <'\tgit update-ref HEAD "$commit" &&\n'> <'\tgit clone ./. victim &&\n'> 
            <'\t( cd victim && git config receive.denyCurrentBranch warn && git log ) &&\n'> <'\tgit update-ref HEAD "$zero" &&\n'> <'\tparent=$zero &&\n'> <'\ti=0 &&\n'> 
            <'\twhile test $i -le $cnt\n'> <'\tdo\n'> <'\t    i=$(($i+1)) &&\n'> <'\t    test_tick &&\n'> 
            <'\t    echo "Rebase #$i" >mozart/is/pink &&\n'> <'\t    git update-index --add mozart/is/pink &&\n'> <'\t    tree=$(git write-tree) &&\n'> 
            <'\t    commit=$(echo "Rebase #$i" | git commit-tree $tree -p $parent) &&\n'> <'\t    git update-ref refs/tags/rebase$i $commit &&\n'> <'\t    parent=$commit || return 1\n'> 
            <'\tdone &&\n'> <'\tgit update-ref HEAD "$commit" &&\n'> <'\techo Rebase &&\n'> <'\tgit log'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'pack the source repository'>)}
        {(SQ <'\n'> <'\tgit repack -a -d &&\n'> <'\tgit prune\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'pack the destination repository'>)}
        {
          (SQ <'\n'> <'    (\n'> <'\tcd victim &&\n'> <'\tgit repack -a -d &&\n'> <'\tgit prune\n'> 
            <'    )\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'refuse pushing rewound head without --force'>)}
        {
          (SQ <'\n'> <'\tpushed_head=$(git rev-parse --verify master) &&\n'> 
            <'\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n'> <'\ttest_must_fail git send-pack ./victim master &&\n'> 
            <'\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n'> <'\ttest "$victim_head" = "$victim_orig" &&\n'> <'\t# this should update\n'> 
            <'\tgit send-pack --force ./victim master &&\n'> <'\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n'> 
            <'\ttest "$victim_head" = "$pushed_head"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'push can be used to delete a ref'>)}
        {
          (SQ <'\n'> <'\t( cd victim && git branch extra master ) &&\n'> 
            <'\tgit send-pack ./victim :extra master &&\n'> <'\t( cd victim &&\n'> <'\t  test_must_fail git rev-parse --verify extra )\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'refuse deleting push with denyDeletes'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t    cd victim &&\n'> <'\t    ( git branch -D extra || : ) &&\n'> 
            <'\t    git config receive.denyDeletes true &&\n'> <'\t    git branch extra master\n'> <'\t) &&\n'> 
            <'\ttest_must_fail git send-pack ./victim :extra master\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'cannot override denyDeletes with git -c send-pack'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd victim &&\n'> <'\t\ttest_might_fail git branch -D extra &&\n'> 
            <'\t\tgit config receive.denyDeletes true &&\n'> <'\t\tgit branch extra master\n'> <'\t) &&\n'> 
            <'\ttest_must_fail git -c receive.denyDeletes=false \\\n'> <'\t\t\t\t\tsend-pack ./victim :extra master\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'override denyDeletes with git -c receive-pack'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd victim &&\n'> <'\t\ttest_might_fail git branch -D extra &&\n'> 
            <'\t\tgit config receive.denyDeletes true &&\n'> <'\t\tgit branch extra master\n'> <'\t) &&\n'> <'\tgit send-pack \\\n'> 
            <'\t\t--receive-pack="git -c receive.denyDeletes=false receive-pack" \\\n'> <'\t\t./victim :extra master\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'denyNonFastforwards trumps --force'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t    cd victim &&\n'> <'\t    ( git branch -D extra || : ) &&\n'> 
            <'\t    git config receive.denyNonFastforwards true\n'> <'\t) &&\n'> <'\tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n'> 
            <'\ttest_must_fail git send-pack --force ./victim master^:master &&\n'> <'\tvictim_head=$(cd victim && git rev-parse --verify master) &&\n'> 
            <'\ttest "$victim_orig" = "$victim_head"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'send-pack --all sends all branches'>)}
        {
          (SQ <'\n'> <'\t# make sure we have at least 2 branches with different\n'> 
            <'\t# values, just to be thorough\n'> <'\tgit branch other-branch HEAD^ &&\n'> <'\n'> <'\tgit init --bare all.git &&\n'> 
            <'\tgit send-pack --all all.git &&\n'> <'\tgit for-each-ref refs/heads >expect &&\n'> 
            <'\tgit -C all.git for-each-ref refs/heads >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'push --all excludes remote-tracking hierarchy'>)}
        {
          (SQ <'\n'> <'\tmkdir parent &&\n'> <'\t(\n'> <'\t    cd parent &&\n'> 
            <'\t    git init && : >file && git add file && git commit -m add\n'> <'\t) &&\n'> <'\tgit clone parent child &&\n'> <'\t(\n'> <'\t    cd child && git push --all\n'> 
            <'\t) &&\n'> <'\t(\n'> <'\t    cd parent &&\n'> <'\t    test -z "$(git for-each-ref refs/remotes/origin)"\n'> 
            <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'receive-pack runs auto-gc in remote repo'>)}
        {
          (SQ <'\n'> <'\trm -rf parent child &&\n'> <'\tgit init parent &&\n'> <'\t(\n'> 
            <'\t    # Setup a repo with 2 packs\n'> <'\t    cd parent &&\n'> <'\t    echo "Some text" >file.txt &&\n'> <'\t    git add . &&\n'> 
            <'\t    git commit -m "Initial commit" &&\n'> <'\t    git repack -adl &&\n'> <'\t    echo "Some more text" >>file.txt &&\n'> 
            <'\t    git commit -a -m "Second commit" &&\n'> <'\t    git repack\n'> <'\t) &&\n'> <'\tcp -R parent child &&\n'> <'\t(\n'> 
            <'\t    # Set the child to auto-pack if more than one pack exists\n'> <'\t    cd child &&\n'> <'\t    git config gc.autopacklimit 1 &&\n'> 
            <'\t    git config gc.autodetach false &&\n'> <'\t    git branch test_auto_gc &&\n'> 
            <'\t    # And create a file that follows the temporary object naming\n'> <'\t    # convention for the auto-gc to remove\n'> <'\t    : >.git/objects/tmp_test_object &&\n'> 
            <'\t    test-chmtime =-1209601 .git/objects/tmp_test_object\n'> <'\t) &&\n'> <'\t(\n'> <'\t    cd parent &&\n'> <'\t    echo "Even more text" >>file.txt &&\n'> 
            <'\t    git commit -a -m "Third commit" &&\n'> <'\t    git send-pack ../child HEAD:refs/heads/test_auto_gc\n'> <'\t) &&\n'> 
            <'\ttest ! -e child/.git/objects/tmp_test_object\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <rewound_push_setup>
      name: rewound_push_setup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <rm>
                  more_env: []
                  words: [{<rm>} {<-rf>} {<parent>} {<child>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <mkdir>
                  more_env: []
                  words: [{<mkdir>} {<parent>}]
                  redirects: []
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {<parent>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<init>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {<one>}]
                          redirects: [
                            (Redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<file>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<add>} {<file>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<commit>} {<-m>} {<one>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<config>} {<receive.denyCurrentBranch>} {<warn>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {<two>}]
                          redirects: [
                            (Redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<file>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<commit>} {<-a>} {<-m>} {<two>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [
                        <Id.Op_DAmp _>
                        <Id.Op_DAmp _>
                        <Id.Op_DAmp _>
                        <Id.Op_DAmp _>
                        <Id.Op_DAmp _>
                        <Id.Op_DAmp _>
                        <Id.Op_DAmp _>
                      ]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<clone>} {<parent>} {<child>}]
                  redirects: []
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {<child>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<reset>} {<--hard>} {<HEAD> <Id.Lit_Other '^'>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _> <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>}
        {(SQ <'pushing explicit refspecs respects forcing'>)}
        {
          (SQ <'\n'> <'\trewound_push_setup &&\n'> 
            <'\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n'> <'\t(\n'> <'\t    cd child &&\n'> <'\t    test_must_fail git send-pack ../parent \\\n'> 
            <'\t\trefs/heads/master:refs/heads/master\n'> <'\t) &&\n'> <'\tparent_head=$(cd parent && git rev-parse --verify master) &&\n'> 
            <'\ttest "$parent_orig" = "$parent_head" &&\n'> <'\t(\n'> <'\t    cd child &&\n'> <'\t    git send-pack ../parent \\\n'> 
            <'\t        +refs/heads/master:refs/heads/master\n'> <'\t) &&\n'> <'\tparent_head=$(cd parent && git rev-parse --verify master) &&\n'> 
            <'\tchild_head=$(cd child && git rev-parse --verify master) &&\n'> <'\ttest "$parent_head" = "$child_head"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'pushing wildcard refspecs respects forcing'>)}
        {
          (SQ <'\n'> <'\trewound_push_setup &&\n'> 
            <'\tparent_orig=$(cd parent && git rev-parse --verify master) &&\n'> <'\t(\n'> <'\t    cd child &&\n'> <'\t    test_must_fail git send-pack ../parent \\\n'> 
            <'\t        "refs/heads/*:refs/heads/*"\n'> <'\t) &&\n'> <'\tparent_head=$(cd parent && git rev-parse --verify master) &&\n'> 
            <'\ttest "$parent_orig" = "$parent_head" &&\n'> <'\t(\n'> <'\t    cd child &&\n'> <'\t    git send-pack ../parent \\\n'> 
            <'\t        "+refs/heads/*:refs/heads/*"\n'> <'\t) &&\n'> <'\tparent_head=$(cd parent && git rev-parse --verify master) &&\n'> 
            <'\tchild_head=$(cd child && git rev-parse --verify master) &&\n'> <'\ttest "$parent_head" = "$child_head"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'deny pushing to delete current branch'>)}
        {
          (SQ <'\n'> <'\trewound_push_setup &&\n'> <'\t(\n'> <'\t    cd child &&\n'> 
            <'\t    test_must_fail git send-pack ../parent :refs/heads/master 2>errs\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)