From: "Василий Макаров" <einmalfel@gmail.com>
To: git@vger.kernel.org
Cc: jrnieder@gmail.com
Subject: [PATCH 2/2] t6010: add test to git merge-base --all --octopus
Date: Sat, 28 Dec 2013 15:04:41 +0400 [thread overview]
Message-ID: <CABEtfDFRYkbVsJc2SZcCPwyUBAN=3dMv9yoYuoRce4c7VBxrkg@mail.gmail.com> (raw)
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 for
octopus-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
reply other threads:[~2013-12-28 11:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABEtfDFRYkbVsJc2SZcCPwyUBAN=3dMv9yoYuoRce4c7VBxrkg@mail.gmail.com' \
--to=einmalfel@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).