From 85bf49f9a55fd9ded396460d245a55b651d7bdaa Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 11 Dec 2009 16:38:58 -0800 Subject: octopus: reenable fast-forward merges The fast-forward logic is never being triggered because $common and $MRC are never equivalent. $common is initialized to a commit id by merge-base and MRC is initialized to HEAD. Fix this by initializing $MRC to the commit id for HEAD so that its possible for $MRC and $common to be equal. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- t/t7602-merge-octopus-many.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 't/t7602-merge-octopus-many.sh') diff --git a/t/t7602-merge-octopus-many.sh b/t/t7602-merge-octopus-many.sh index 737703322..274616951 100755 --- a/t/t7602-merge-octopus-many.sh +++ b/t/t7602-merge-octopus-many.sh @@ -82,4 +82,22 @@ test_expect_success 'merge up-to-date output uses pretty names' ' git merge c4 c5 >actual && test_cmp actual expected ' + +cat >expected <<\EOF +Fast-forwarding to: c1 +Trying simple merge with c2 +Merge made by octopus. + c1.c | 1 + + c2.c | 1 + + 2 files changed, 2 insertions(+), 0 deletions(-) + create mode 100644 c1.c + create mode 100644 c2.c +EOF + +test_expect_success 'merge fast-forward output uses pretty names' ' + git reset --hard c0 && + git merge c1 c2 >actual && + test_cmp actual expected +' + test_done -- cgit v1.2.1