Skip to content

Commit

Permalink
Add testcase to ensure merging an early part of a branch is done prop…
Browse files Browse the repository at this point in the history
…erly

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Oct 14, 2008
1 parent 6c16792 commit 4e6d4bc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions t/t7600-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -507,4 +507,30 @@ test_expect_success 'in-index merge' '

test_debug 'gitk --all'

cat >expected <<EOF
Merge branch 'c5' (early part)
EOF

test_expect_success 'merge early part of c2' '
git reset --hard c3 &&
echo c4 > 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_done

0 comments on commit 4e6d4bc

Please sign in to comment.