]>
Commit | Line | Data |
---|---|---|
5e835cac JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='rebasing a commit with multi-line first paragraph.' | |
4 | ||
5 | . ./test-lib.sh | |
6 | ||
7 | test_expect_success setup ' | |
8 | ||
9 | >file && | |
10 | git add file && | |
11 | test_tick && | |
12 | git commit -m initial && | |
13 | ||
14 | echo hello >file && | |
15 | test_tick && | |
16 | git commit -a -m "A sample commit log message that has a long | |
17 | summary that spills over multiple lines. | |
18 | ||
a48fcd83 | 19 | But otherwise with a sane description." && |
5e835cac JH |
20 | |
21 | git branch side && | |
22 | ||
23 | git reset --hard HEAD^ && | |
24 | >elif && | |
25 | git add elif && | |
26 | test_tick && | |
ed5144d7 | 27 | git commit -m second && |
5e835cac | 28 | |
ed5144d7 GH |
29 | git checkout -b side2 && |
30 | >afile && | |
31 | git add afile && | |
32 | test_tick && | |
33 | git commit -m third && | |
34 | echo hello >afile && | |
35 | test_tick && | |
36 | git commit -a -m fourth && | |
37 | git checkout -b side-merge && | |
38 | git reset --hard HEAD^^ && | |
39 | git merge --no-ff -m "A merge commit log message that has a long | |
40 | summary that spills over multiple lines. | |
41 | ||
42 | But otherwise with a sane description." side2 && | |
43 | git branch side-merge-original | |
5e835cac JH |
44 | ' |
45 | ||
46 | test_expect_success rebase ' | |
47 | ||
48 | git checkout side && | |
49 | git rebase master && | |
9524cf29 SB |
50 | git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && |
51 | git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect && | |
5e835cac JH |
52 | test_cmp expect actual |
53 | ||
ed5144d7 | 54 | ' |
11aad464 | 55 | test_expect_success REBASE_P rebasep ' |
ed5144d7 GH |
56 | |
57 | git checkout side-merge && | |
58 | git rebase -p side && | |
59 | git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && | |
60 | git cat-file commit side-merge-original | sed -e "1,/^\$/d" >expect && | |
61 | test_cmp expect actual | |
62 | ||
5e835cac JH |
63 | ' |
64 | ||
65 | test_done |