interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / t3408-rebase-multi-line.sh

58 lines · 1161 bytes Raw Blame History
1#!/bin/sh
2
3test_description='rebasing a commit with multi-line first paragraph.'
4
5GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8. ./test-lib.sh
9
10test_expect_success setup '
11
12 >file &&
13 git add file &&
14 test_tick &&
15 git commit -m initial &&
16
17 echo hello >file &&
18 test_tick &&
19 git commit -a -m "A sample commit log message that has a long
20summary that spills over multiple lines.
21
22But otherwise with a sane description." &&
23
24 git branch side &&
25
26 git reset --hard HEAD^ &&
27 >elif &&
28 git add elif &&
29 test_tick &&
30 git commit -m second &&
31
32 git checkout -b side2 &&
33 >afile &&
34 git add afile &&
35 test_tick &&
36 git commit -m third &&
37 echo hello >afile &&
38 test_tick &&
39 git commit -a -m fourth &&
40 git checkout -b side-merge &&
41 git reset --hard HEAD^^ &&
42 git merge --no-ff -m "A merge commit log message that has a long
43summary that spills over multiple lines.
44
45But otherwise with a sane description." side2 &&
46 git branch side-merge-original
47'
48
49test_expect_success rebase '
50
51 git checkout side &&
52 git rebase main &&
53 commit_body HEAD >actual &&
54 commit_body side@{1} >expect &&
55 test_cmp expect actual
56
57'
58test_done