(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'merge fast-forward and up to date'>)} spids: [4] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\t>file &&\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\tgit tag c0 &&\n'> <'\n'> <'\techo second >file &&\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m second &&\n'> <'\tgit tag c1 &&\n'> <'\tgit branch test &&\n'> <'\techo third >file &&\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m third &&\n'> <'\tgit tag c2\n'> ) } ) (C {<test_expect_success>} {(SQ <'merge -s recursive up-to-date'>)} { (SQ <'\n'> <'\n'> <'\tgit reset --hard c1 &&\n'> <'\ttest_tick &&\n'> <'\tgit merge -s recursive c0 &&\n'> <'\texpect=$(git rev-parse c1) &&\n'> <'\tcurrent=$(git rev-parse HEAD) &&\n'> <'\ttest "$expect" = "$current"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'merge -s recursive fast-forward'>)} { (SQ <'\n'> <'\n'> <'\tgit reset --hard c0 &&\n'> <'\ttest_tick &&\n'> <'\tgit merge -s recursive c1 &&\n'> <'\texpect=$(git rev-parse c1) &&\n'> <'\tcurrent=$(git rev-parse HEAD) &&\n'> <'\ttest "$expect" = "$current"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'merge -s ours up-to-date'>)} { (SQ <'\n'> <'\n'> <'\tgit reset --hard c1 &&\n'> <'\ttest_tick &&\n'> <'\tgit merge -s ours c0 &&\n'> <'\texpect=$(git rev-parse c1) &&\n'> <'\tcurrent=$(git rev-parse HEAD) &&\n'> <'\ttest "$expect" = "$current"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'merge -s ours fast-forward'>)} { (SQ <'\n'> <'\n'> <'\tgit reset --hard c0 &&\n'> <'\ttest_tick &&\n'> <'\tgit merge -s ours c1 &&\n'> <'\texpect=$(git rev-parse c0^{tree}) &&\n'> <'\tcurrent=$(git rev-parse HEAD^{tree}) &&\n'> <'\ttest "$expect" = "$current"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'merge -s subtree up-to-date'>)} { (SQ <'\n'> <'\n'> <'\tgit reset --hard c1 &&\n'> <'\ttest_tick &&\n'> <'\tgit merge -s subtree c0 &&\n'> <'\texpect=$(git rev-parse c1) &&\n'> <'\tcurrent=$(git rev-parse HEAD) &&\n'> <'\ttest "$expect" = "$current"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'merge fast-forward octopus'>)} { (SQ <'\n'> <'\n'> <'\tgit reset --hard c0 &&\n'> <'\ttest_tick &&\n'> <'\tgit merge c1 c2 &&\n'> <'\texpect=$(git rev-parse c2) &&\n'> <'\tcurrent=$(git rev-parse HEAD) &&\n'> <'\ttest "$expect" = "$current"\n'> ) } ) (C {<test_done>}) ] )