Skip to content

Commit d4e6c4b

Browse files
rctaygitster
authored andcommitted
t7604-merge-custom-message: show that --log doesn't append to -m
Signed-off-by: Tay Ray Chuan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5f35afa commit d4e6c4b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t7604-merge-custom-message.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Testing merge when using a custom message for the merge commit.'
88

99
create_merge_msgs() {
1010
echo >exp.subject "custom message"
11+
12+
cp exp.subject exp.log &&
13+
echo >>exp.log "" &&
14+
echo >>exp.log "* commit 'c2':" &&
15+
echo >>exp.log " c2"
1116
}
1217

1318
test_expect_success 'setup' '
@@ -35,4 +40,11 @@ test_expect_success 'merge c2 with a custom message' '
3540
test_cmp exp.subject actual
3641
'
3742

43+
test_expect_failure 'merge --log appends to custom message' '
44+
git reset --hard c1 &&
45+
git merge --log -m "$(cat exp.subject)" c2 &&
46+
git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
47+
test_cmp exp.log actual
48+
'
49+
3850
test_done

0 commit comments

Comments
 (0)