Skip to content

Commit

Permalink
t7604-merge-custom-message: show that --log doesn't append to -m
Browse files Browse the repository at this point in the history
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed May 10, 2010
1 parent 5f35afa commit d4e6c4b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/t7604-merge-custom-message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Testing merge when using a custom message for the merge commit.'

create_merge_msgs() {
echo >exp.subject "custom message"

cp exp.subject exp.log &&
echo >>exp.log "" &&
echo >>exp.log "* commit 'c2':" &&
echo >>exp.log " c2"
}

test_expect_success 'setup' '
Expand Down Expand Up @@ -35,4 +40,11 @@ test_expect_success 'merge c2 with a custom message' '
test_cmp exp.subject actual
'

test_expect_failure 'merge --log appends to custom message' '
git reset --hard c1 &&
git merge --log -m "$(cat exp.subject)" c2 &&
git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
test_cmp exp.log actual
'

test_done

0 comments on commit d4e6c4b

Please sign in to comment.