Junio C Hamano | 5e835ca | 2008-04-16 12:50:48 -0700 | [diff] [blame] | 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 | |
Jonathan Nieder | a48fcd8 | 2010-10-30 20:46:54 -0500 | [diff] [blame] | 19 | But otherwise with a sane description." && |
Junio C Hamano | 5e835ca | 2008-04-16 12:50:48 -0700 | [diff] [blame] | 20 | |
| 21 | git branch side && |
| 22 | |
| 23 | git reset --hard HEAD^ && |
| 24 | >elif && |
| 25 | git add elif && |
| 26 | test_tick && |
| 27 | git commit -m second |
| 28 | |
| 29 | ' |
| 30 | |
| 31 | test_expect_success rebase ' |
| 32 | |
| 33 | git checkout side && |
| 34 | git rebase master && |
Stephen Boyd | 9524cf2 | 2010-01-26 15:08:31 -0800 | [diff] [blame] | 35 | git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && |
| 36 | git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect && |
Junio C Hamano | 5e835ca | 2008-04-16 12:50:48 -0700 | [diff] [blame] | 37 | test_cmp expect actual |
| 38 | |
| 39 | ' |
| 40 | |
| 41 | test_done |