From: Bagas Sanjaya Date: Wed, 21 Apr 2021 04:08:10 GMT Subject: [PATCH v2] test: add test for git bisect skip with --term* arguments Message-ID: <20210421040808.14185-1-bagasdotme@gmail.com> In-Reply-To: <20210418151459.GC10839@aaberge.net> Trygve Aaberge reported the current git bisect breakage on [1]. After starting bisection with --term-new and --term-old arguments to git bisect start, skipping with git bisect skip does not change HEAD as expected. Let's add the test to catch this breakage. [1]: https://lore.kernel.org/git/20210418151459.GC10839@aaberge.net/ Signed-off-by: Bagas Sanjaya --- Changes from v1: * style changes requested by Junio * rename test script and edit test description to be more descriptive * remove exec >test && + git add test && git commit -m "commit $i" && + test_tick + done +' + +# actual bisection test +test_expect_success 'test moving HEAD when skip bisecting' ' + git bisect start --term-new=ok --term-old=whoops HEAD HEAD~9 && + HASH_SKIPPED_FROM=$(git rev-parse --verify HEAD) && + git bisect skip && + HASH_SKIPPED_TO=$(git rev-parse --verify HEAD) && + test $HASH_SKIPPED_FROM != $HASH_SKIPPED_TO +' + +test_done base-commit: b0c09ab8796fb736efa432b8e817334f3e5ee75a -- 2.25.1