mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
ce9d823b91
Even if the user explicitly gave her own message to "git merge", the command still added its standard merge message. It resulted in a useless repetition like this: % git merge -m "Merge early part of side branch" `git rev-parse side~2` % git show -s commit 37217141e7519629353738d5e4e677a15096206f Merge: e68e646 a1d2374 Author: しらいし ななこ <nanako3@lavabit.com> Date: Wed Dec 2 14:33:20 2009 +0900 Merge early part of side branch Merge commit 'a1d2374f8f52f4e8a53171601a920b538a6cec23' The gave her own message because she didn't want git to add the standard message (if she wanted to, she wouldn't have given one, or she would have prepared it using git-fmt-merge-msg command). Noticed by Nanako Shiraishi Signed-off-by: Junio C Hamano <gitster@pobox.com>
34 lines
641 B
Bash
Executable file
34 lines
641 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='git merge
|
|
|
|
Testing merge when using a custom message for the merge commit.'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'setup' '
|
|
echo c0 > c0.c &&
|
|
git add c0.c &&
|
|
git commit -m c0 &&
|
|
git tag c0 &&
|
|
echo c1 > c1.c &&
|
|
git add c1.c &&
|
|
git commit -m c1 &&
|
|
git tag c1 &&
|
|
git reset --hard c0 &&
|
|
echo c2 > c2.c &&
|
|
git add c2.c &&
|
|
git commit -m c2 &&
|
|
git tag c2
|
|
'
|
|
|
|
|
|
test_expect_success 'merge c2 with a custom message' '
|
|
git reset --hard c1 &&
|
|
echo >expected "custom message" &&
|
|
git merge -m "custom message" c2 &&
|
|
git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
|
|
test_cmp expected actual
|
|
'
|
|
|
|
test_done
|