[PATCH 2/2] t6010: add test to git merge-base --all --octopus
From: Василий Макаров <hidden>
Date: 2016-06-15 22:59:31
Subsystem:
the rest · Maintainer:
Linus Torvalds
And here is the test: with git 1.8.5.2 this test don't pass because of git merge-base may return duplicates and incorrect set of bases (not best common ancestors) --- t/t6010-merge-base.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh
index f80bba8..8652c12 100755
--- a/t/t6010-merge-base.sh
+++ b/t/t6010-merge-base.sh@@ -230,4 +230,43 @@ test_expect_success 'criss-cross merge-base foroctopus-step' ' test_cmp expected.sorted actual.sorted ' +test_expect_success 'merge-base --octopus --all for complex tree' ' + # Best common ancestor for JE, JAA and JDD is JC + # JE + # / | + # / | + # / | + # JAA / | + # |\ / | + # | \ | JDD | + # | \ |/ | | + # | JC JD | + # | | /| | + # | |/ | | + # JA | | | + # |\ /| | | + # | JB | | | + # \ \ | / / + # \__\|/___/ + # J + test_commit J && + test_commit JB && + git reset --hard J && + test_commit JC && + git reset --hard J && + test_commit JTEMP1 && + test_merge JA JB && + test_merge JAA JC && + git reset --hard J && + test_commit JTEMP2 && + test_merge JD JB && + test_merge JDD JC && + git reset --hard J && + test_commit JTEMP3 && + test_merge JE JC && + git rev-parse JC > expected && + git merge-base --all --octopus JAA JDD JE > actual && + test_cmp expected actual +' + test_done -- 1.8.3.1