From: Junio C Hamano Date: Sun, 19 Oct 2008 23:06:21 +0000 (-0700) Subject: Merge branch 'mv/merge-noff' X-Git-Tag: v1.6.1-rc1~134 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4f2d651e5b3414eac5d22ff47366d22c8cc289f6;p=git.git Merge branch 'mv/merge-noff' * mv/merge-noff: builtin-commit: use reduce_heads() only when appropriate Conflicts: builtin-commit.c t/t7600-merge.sh --- 4f2d651e5b3414eac5d22ff47366d22c8cc289f6 diff --cc t/t7600-merge.sh index 3a36a95b9,209d7cd4b..e5b210bc9 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@@ -511,37 -511,20 +511,53 @@@ test_expect_success 'in-index merge' test_debug 'gitk --all' +test_expect_success 'refresh the index before merging' ' + git reset --hard c1 && + sleep 1 && + touch file && + git merge c3 +' + +cat >expected < c4.c && + git add c4.c && + git commit -m c4 && + git tag c4 && + echo c5 > c5.c && + git add c5.c && + git commit -m c5 && + git tag c5 && + git reset --hard c3 && + echo c6 > c6.c && + git add c6.c && + git commit -m c6 && + git tag c6 && + git merge c5~1 && + git show -s --pretty=format:%s HEAD > actual && + test_cmp actual expected +' + +test_debug 'gitk --all' + + test_expect_success 'merge --no-ff --no-commit && commit' ' + git reset --hard c0 && + git merge --no-ff --no-commit c1 && + EDITOR=: git commit && + verify_parents $c0 $c1 + ' + + test_debug 'gitk --all' + + test_expect_success 'amending no-ff merge commit' ' + EDITOR=: git commit --amend && + verify_parents $c0 $c1 + ' + + test_debug 'gitk --all' + test_done