(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 <'git merge\n'> <'\n'> <'Testing pull.* configuration parsing.'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <setup>)}
        {
          (SQ <'\n'> <'\techo c0 >c0.c &&\n'> <'\tgit add c0.c &&\n'> <'\tgit commit -m c0 &&\n'> 
            <'\tgit tag c0 &&\n'> <'\techo c1 >c1.c &&\n'> <'\tgit add c1.c &&\n'> <'\tgit commit -m c1 &&\n'> <'\tgit tag c1 &&\n'> 
            <'\tgit reset --hard c0 &&\n'> <'\techo c2 >c2.c &&\n'> <'\tgit add c2.c &&\n'> <'\tgit commit -m c2 &&\n'> <'\tgit tag c2 &&\n'> 
            <'\tgit reset --hard c0 &&\n'> <'\techo c3 >c3.c &&\n'> <'\tgit add c3.c &&\n'> <'\tgit commit -m c3 &&\n'> <'\tgit tag c3\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge c1 with c2'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> <'\ttest -f c0.c &&\n'> <'\ttest -f c1.c &&\n'> 
            <'\ttest ! -f c2.c &&\n'> <'\ttest ! -f c3.c &&\n'> <'\tgit merge c2 &&\n'> <'\ttest -f c1.c &&\n'> <'\ttest -f c2.c\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fast-forward pull succeeds with "true" in pull.ff'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c0 &&\n'> <'\ttest_config pull.ff true &&\n'> 
            <'\tgit pull . c1 &&\n'> <'\ttest "$(git rev-parse HEAD)" = "$(git rev-parse c1)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'pull.ff=true overrides merge.ff=false'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c0 &&\n'> <'\ttest_config merge.ff false &&\n'> 
            <'\ttest_config pull.ff true &&\n'> <'\tgit pull . c1 &&\n'> <'\ttest "$(git rev-parse HEAD)" = "$(git rev-parse c1)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fast-forward pull creates merge with "false" in pull.ff'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c0 &&\n'> <'\ttest_config pull.ff false &&\n'> 
            <'\tgit pull . c1 &&\n'> <'\ttest "$(git rev-parse HEAD^1)" = "$(git rev-parse c0)" &&\n'> 
            <'\ttest "$(git rev-parse HEAD^2)" = "$(git rev-parse c1)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'pull prevents non-fast-forward with "only" in pull.ff'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> <'\ttest_config pull.ff only &&\n'> 
            <'\ttest_must_fail git pull . c3\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge c1 with c2 (ours in pull.twohead)'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> <'\tgit config pull.twohead ours &&\n'> 
            <'\tgit merge c2 &&\n'> <'\ttest -f c1.c &&\n'> <'\t! test -f c2.c\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge c1 with c2 and c3 (recursive in pull.octopus)'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> <'\tgit config pull.octopus "recursive" &&\n'> 
            <'\ttest_must_fail git merge c2 c3 &&\n'> <'\ttest "$(git rev-parse c1)" = "$(git rev-parse HEAD)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge c1 with c2 and c3 (recursive and octopus in pull.octopus)'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> 
            <'\tgit config pull.octopus "recursive octopus" &&\n'> <'\tgit merge c2 c3 &&\n'> <'\ttest "$(git rev-parse c1)" != "$(git rev-parse HEAD)" &&\n'> 
            <'\ttest "$(git rev-parse c1)" = "$(git rev-parse HEAD^1)" &&\n'> <'\ttest "$(git rev-parse c2)" = "$(git rev-parse HEAD^2)" &&\n'> 
            <'\ttest "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&\n'> <'\tgit diff --exit-code &&\n'> <'\ttest -f c0.c &&\n'> <'\ttest -f c1.c &&\n'> <'\ttest -f c2.c &&\n'> 
            <'\ttest -f c3.c\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <conflict_count>
      name: conflict_count
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<diff-files>} {<--name-only>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<ls-files>} {<--unmerged>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
                (command.Simple
                  blame_tok: <wc>
                  more_env: []
                  words: [{<wc>} {<-l>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'setup conflicted merge'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard c0 &&\n'> <'\techo A >conflict.c &&\n'> 
            <'\tgit add conflict.c &&\n'> <'\techo contents >foo.c &&\n'> <'\tgit add foo.c &&\n'> <'\tgit commit -m c4 &&\n'> 
            <'\tgit tag c4 &&\n'> <'\techo B >conflict.c &&\n'> <'\tgit add conflict.c &&\n'> <'\tgit mv foo.c bar.c &&\n'> 
            <'\tgit commit -m c5 &&\n'> <'\tgit tag c5 &&\n'> <'\tgit reset --hard c4 &&\n'> <'\techo C >conflict.c &&\n'> 
            <'\tgit add conflict.c &&\n'> <'\techo secondline >> foo.c &&\n'> <'\tgit add foo.c &&\n'> <'\tgit commit -m c6 &&\n'> 
            <'\tgit tag c6\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge picks up the best result'>)}
        {
          (SQ <'\n'> <'\tgit config --unset-all pull.twohead &&\n'> <'\tgit reset --hard c5 &&\n'> 
            <'\ttest_must_fail git merge -s resolve c6 &&\n'> <'\tresolve_count=$(conflict_count) &&\n'> <'\tgit reset --hard c5 &&\n'> 
            <'\ttest_must_fail git merge -s recursive c6 &&\n'> <'\trecursive_count=$(conflict_count) &&\n'> <'\tgit reset --hard c5 &&\n'> 
            <'\ttest_must_fail git merge -s recursive -s resolve c6 &&\n'> <'\tauto_count=$(conflict_count) &&\n'> <'\ttest $auto_count = $recursive_count &&\n'> 
            <'\ttest $auto_count != $resolve_count\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge picks up the best result (from config)'>)}
        {
          (SQ <'\n'> <'\tgit config pull.twohead "recursive resolve" &&\n'> 
            <'\tgit reset --hard c5 &&\n'> <'\ttest_must_fail git merge -s resolve c6 &&\n'> <'\tresolve_count=$(conflict_count) &&\n'> 
            <'\tgit reset --hard c5 &&\n'> <'\ttest_must_fail git merge -s recursive c6 &&\n'> <'\trecursive_count=$(conflict_count) &&\n'> 
            <'\tgit reset --hard c5 &&\n'> <'\ttest_must_fail git merge c6 &&\n'> <'\tauto_count=$(conflict_count) &&\n'> 
            <'\ttest $auto_count = $recursive_count &&\n'> <'\ttest $auto_count != $resolve_count\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge errors out on invalid strategy'>)}
        {
          (SQ <'\n'> <'\tgit config pull.twohead "foobar" &&\n'> <'\tgit reset --hard c5 &&\n'> 
            <'\ttest_must_fail git merge c6\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge errors out on invalid strategy'>)}
        {
          (SQ <'\n'> <'\tgit config --unset-all pull.twohead &&\n'> <'\tgit reset --hard c5 &&\n'> 
            <'\ttest_must_fail git merge -s "resolve recursive" c6\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)