summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-10-13 20:54:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-14 23:52:09 (GMT)
commit4e6d4bc0f0f1388dfcad2af4804b35289ed4ec92 (patch)
tree3bee459d407edb0e5ec41305d1f31670177fdade
parent6c1679254cb6be7b268d1431595e1626bf18792d (diff)
downloadgit-4e6d4bc0f0f1388dfcad2af4804b35289ed4ec92.zip
git-4e6d4bc0f0f1388dfcad2af4804b35289ed4ec92.tar.gz
git-4e6d4bc0f0f1388dfcad2af4804b35289ed4ec92.tar.bz2
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>
-rwxr-xr-xt/t7600-merge.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 94bc556..5abce31 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -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