@matheusbsbs / matheus-bagliano / commits / 4e6d4bc0f0
Fork 0

Add testcase to ensure merging an early part of a branch is done properly

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miklos Vajna committed Oct 13, 2008 at 22:54 UTC 4e6d4bc0f0f1388dfcad2af4804b35289ed4ec92
1 file changed +26
t/t7600-merge.sh
+26
@@ -507,4 +507,30 @@ test_expect_success 'in-index merge' '
507
508 test_debug 'gitk --all'
509
510 +cat >expected <<EOF
511 +Merge branch 'c5' (early part)
512 +EOF
513 +
514 +test_expect_success 'merge early part of c2' '
515 + git reset --hard c3 &&
516 + echo c4 > c4.c &&
517 + git add c4.c &&
518 + git commit -m c4 &&
519 + git tag c4 &&
520 + echo c5 > c5.c &&
521 + git add c5.c &&
522 + git commit -m c5 &&
523 + git tag c5 &&
524 + git reset --hard c3 &&
525 + echo c6 > c6.c &&
526 + git add c6.c &&
527 + git commit -m c6 &&
528 + git tag c6 &&
529 + git merge c5~1 &&
530 + git show -s --pretty=format:%s HEAD > actual &&
531 + test_cmp actual expected
532 +'
533 +
534 +test_debug 'gitk --all'
535 +
536 test_done