3 test_description
='rebase topology tests with merges'
5 TEST_PASSES_SANITIZE_LEAK
=true
7 .
"$TEST_DIRECTORY"/lib-rebase.sh
9 test_revision_subjects
() {
12 set -- $
(git log
--format=%s
--no-walk=unsorted
"$@")
13 test "$expected" = "$*"
23 test_expect_success
'setup of non-linear-history' '
52 test_expect_
$result "rebase $* after merge from upstream" "
55 test_cmp_rev e HEAD~2 &&
56 test_linear_range 'n o' e..
59 test_run_rebase success
--apply
60 test_run_rebase success
-m
61 test_run_rebase success
-i
68 test_expect_
$result "rebase $* of non-linear history is linearized in place" "
71 test_cmp_rev d HEAD~3 &&
72 test_linear_range "\'"$expected"\'" d..
75 test_run_rebase success
'n o e' --apply
76 test_run_rebase success
'n o e' -m
77 test_run_rebase success
'n o e' -i
84 test_expect_
$result "rebase $* of non-linear history is linearized upstream" "
87 test_cmp_rev c HEAD~4 &&
88 test_linear_range "\'"$expected"\'" c..
91 test_run_rebase success
'd n o e' --apply
92 test_run_rebase success
'd n o e' -m
93 test_run_rebase success
'd n o e' -i
100 test_expect_
$result "rebase $* of non-linear history with merges after upstream merge is linearized" "
103 test_cmp_rev c HEAD~4 &&
104 test_linear_range "\'"$expected"\'" c..
107 test_run_rebase success
'd n o e' --apply
108 test_run_rebase success
'd n o e' -m
109 test_run_rebase success
'd n o e' -i