From: Tiago Botelho Date: Wed, 23 May 2018 12:01:10 GMT Subject: [RFC PATCH v3 2/2] Add tests for rev-list --bisect* --first-parent Message-ID: <20180523120110.36532-1-tiagonbotelho@hotmail.com> --- t/t6002-rev-list-bisect.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh index a66140803..977c82157 100755 --- a/t/t6002-rev-list-bisect.sh +++ b/t/t6002-rev-list-bisect.sh @@ -263,4 +263,43 @@ test_expect_success 'rev-parse --bisect can default to good/bad refs' ' test_cmp expect.sorted actual.sorted ' +# We generate the following commit graph: +# +# A +# / \ +# D B +# | | +# EX C +# \ / +# FX + +test_expect_success 'setup' ' + test_commit A && + test_commit B && + test_commit C && + git reset --hard A && + test_commit D && + test_commit EX && + test_merge FX C +' + +test_output_expect_success "--bisect --first-parent" 'git rev-list --bisect --first-parent FX ^A' <