blob: e5ad67c643ffee9b79fce813673732faa950714f [file] [log] [blame]
Junio C Hamanod7f6bae2007-07-28 17:57:25 -07001#!/bin/sh
2
3test_description='rebase should not insist on git message convention'
4
5. ./test-lib.sh
6
7cat >F <<\EOF
8This is an example of a commit log message
9that does not conform to git commit convention.
10
11It has two paragraphs, but its first paragraph is not friendly
12to oneline summary format.
13EOF
14
15test_expect_success setup '
16
17 >file1 &&
18 >file2 &&
19 git add file1 file2 &&
20 test_tick &&
21 git commit -m "Initial commit" &&
22
23 git checkout -b side &&
24 cat F >file2 &&
25 git add file2 &&
26 test_tick &&
27 git commit -F F &&
28
29 git cat-file commit HEAD | sed -e "1,/^\$/d" >F0 &&
30
31 git checkout master &&
32
33 echo One >file1 &&
34 test_tick &&
35 git add file1 &&
36 git commit -m "Second commit"
37'
38
39test_expect_success rebase '
40
41 git rebase master side &&
42 git cat-file commit HEAD | sed -e "1,/^\$/d" >F1 &&
43
Jeff King82ebb0b2008-03-12 17:36:36 -040044 test_cmp F0 F1 &&
45 test_cmp F F0
Junio C Hamanod7f6bae2007-07-28 17:57:25 -070046'
47
48test_done