#!/bin/sh global test_description := ''rebasing a commit with multi-line first paragraph.'' source ./test-lib.sh test_expect_success setup ' >file && git add file && test_tick && git commit -m initial && echo hello >file && test_tick && git commit -a -m "A sample commit log message that has a long summary that spills over multiple lines. But otherwise with a sane description." && git branch side && git reset --hard HEAD^ && >elif && git add elif && test_tick && git commit -m second ' test_expect_success rebase ' git checkout side && git rebase master && git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect && test_cmp expect actual ' test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"rebasing a commit with multi-line first paragraph.">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(setup)} { (SQ <"\n"> <"\n"> <"\t>file &&\n"> <"\tgit add file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m initial &&\n"> <"\n"> <"\techo hello >file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -a -m \"A sample commit log message that has a long\n"> <"summary that spills over multiple lines.\n"> <"\n"> <"But otherwise with a sane description.\" &&\n"> <"\n"> <"\tgit branch side &&\n"> <"\n"> <"\tgit reset --hard HEAD^ &&\n"> <"\t>elif &&\n"> <"\tgit add elif &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m second\n"> <"\n"> ) } ) (C {(test_expect_success)} {(rebase)} { (SQ <"\n"> <"\n"> <"\tgit checkout side &&\n"> <"\tgit rebase master &&\n"> <"\tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n"> <"\tgit cat-file commit side@{1} | sed -e \"1,/^\\$/d\" >expect &&\n"> <"\ttest_cmp expect actual\n"> <"\n"> ) } ) (C {(test_done)}) ] )