3 test_description
='rebasing a commit with multi-line first paragraph.'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 TEST_PASSES_SANITIZE_LEAK
=true
11 test_expect_success setup
'
16 git commit -m initial &&
20 git commit -a -m "A sample commit log message that has a long
21 summary that spills over multiple lines.
23 But otherwise with a sane description." &&
27 git reset --hard HEAD^ &&
31 git commit -m second &&
33 git checkout -b side2 &&
37 git commit -m third &&
40 git commit -a -m fourth &&
41 git checkout -b side-merge &&
42 git reset --hard HEAD^^ &&
43 git merge --no-ff -m "A merge commit log message that has a long
44 summary that spills over multiple lines.
46 But otherwise with a sane description." side2 &&
47 git branch side-merge-original
50 test_expect_success rebase
'
54 git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
55 git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&
56 test_cmp expect actual