Subject: [BUG] merge --no-ff --no-commit && commit

From: SZEDER Gábor <[email-masked]>
Date: Fri, 26 Sep 2008 01:50:29 +0200

Hi,

after today's update on master, the merge commit generated by 'git
merge --no-ff --no-commit branch && git commit' has only one parent if
the merge can be resolved as a fast forward.  The test case below
demonstrates this behaviour.

Bisecting showed that the regression was introduced by commit 6bb6b034
(builtin-commit: use commit_tree(), 2008-09-10).

Regards,
Gábor

 -- >8 --

diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 9516f54..98cfc53 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -511,4 +511,13 @@ test_expect_success 'in-index merge' '
 
 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_done