(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <--ancestry-path>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShFunction name: test_merge body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<test_tick>}) (C {<git>} {<merge>} {<-s>} {<ours>} {<-m>} {(DQ ($ Id.VSub_Number '$2'))} {(DQ ($ Id.VSub_Number '$1'))} ) (C {<git>} {<tag>} {(DQ ($ Id.VSub_Number '$2'))}) ] ) ] ) ) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\ttest_commit A &&\n'> <'\ttest_commit B &&\n'> <'\ttest_commit C &&\n'> <'\ttest_commit D &&\n'> <'\ttest_commit E &&\n'> <'\ttest_commit F &&\n'> <'\tgit reset --hard C &&\n'> <'\ttest_commit G &&\n'> <'\ttest_merge E H &&\n'> <'\ttest_commit I &&\n'> <'\ttest_merge F J &&\n'> <'\tgit reset --hard A &&\n'> <'\ttest_commit K &&\n'> <'\ttest_merge J L &&\n'> <'\ttest_commit M\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list D..M'>)} { (SQ <'\n'> <'\tfor c in E F G H I J K L M; do echo $c; done >expect &&\n'> <'\tgit rev-list --format=%s D..M |\n'> <'\tsed -e "/^commit /d" |\n'> <'\tsort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list --ancestry-path D..M'>)} { (SQ <'\n'> <'\tfor c in E F H I J L M; do echo $c; done >expect &&\n'> <'\tgit rev-list --ancestry-path --format=%s D..M |\n'> <'\tsed -e "/^commit /d" |\n'> <'\tsort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list D..M -- M.t'>)} { (SQ <'\n'> <'\techo M >expect &&\n'> <'\tgit rev-list --format=%s D..M -- M.t |\n'> <'\tsed -e "/^commit /d" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list --ancestry-path D..M -- M.t'>)} { (SQ <'\n'> <'\techo M >expect &&\n'> <'\tgit rev-list --ancestry-path --format=%s D..M -- M.t |\n'> <'\tsed -e "/^commit /d" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list F...I'>)} { (SQ <'\n'> <'\tfor c in F G H I; do echo $c; done >expect &&\n'> <'\tgit rev-list --format=%s F...I |\n'> <'\tsed -e "/^commit /d" |\n'> <'\tsort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list --ancestry-path F...I'>)} { (SQ <'\n'> <'\tfor c in F H I; do echo $c; done >expect &&\n'> <'\tgit rev-list --ancestry-path --format=%s F...I |\n'> <'\tsed -e "/^commit /d" |\n'> <'\tsort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list G..M -- G.t'>)} { (SQ <'\n'> <'\t>expect &&\n'> <'\tgit rev-list --format=%s G..M -- G.t |\n'> <'\tsed -e "/^commit /d" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list --ancestry-path G..M -- G.t'>)} { (SQ <'\n'> <'\techo L >expect &&\n'> <'\tgit rev-list --ancestry-path --format=%s G..M -- G.t |\n'> <'\tsed -e "/^commit /d" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'rev-list --ancestry-path --simplify-merges G^..M -- G.t'>)} { (SQ <'\n'> <'\tfor c in G L; do echo $c; done >expect &&\n'> <'\tgit rev-list --ancestry-path --simplify-merges --format=%s G^..M -- G.t |\n'> <'\tsed -e "/^commit /d" |\n'> <'\tsort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup criss-cross'>)} { (SQ <'\n'> <'\tmkdir criss-cross &&\n'> <'\t(cd criss-cross &&\n'> <'\t git init &&\n'> <'\t test_commit A &&\n'> <'\t git checkout -b xb master &&\n'> <'\t test_commit B &&\n'> <'\t git checkout -b xc master &&\n'> <'\t test_commit C &&\n'> <'\t git checkout -b xbc xb -- &&\n'> <'\t git merge xc &&\n'> <'\t git checkout -b xcb xc -- &&\n'> <'\t git merge xb &&\n'> <'\t git checkout master)\n'> ) } ) (C {<test_expect_success>} {(SQ <'criss-cross: rev-list --ancestry-path cb..bc'>)} { (SQ <'\n'> <'\t(cd criss-cross &&\n'> <'\t git rev-list --ancestry-path xcb..xbc > actual &&\n'> <'\t test -z "$(cat actual)")\n'> ) } ) (C {<test_expect_success>} {(SQ <'criss-cross: rev-list --ancestry-path --all ^cb'>)} { (SQ <'\n'> <'\t(cd criss-cross &&\n'> <'\t git rev-list --ancestry-path --all ^xcb > actual &&\n'> <'\t test -z "$(cat actual)")\n'> ) } ) (C {<test_done>}) ] )