@@ -299,6 +299,18 @@ test_expect_success 'bisect skip and bisect replay' '
git bisect reset
'
+# Bisect is started with --term-new and --term-old arguments,
+# then skip. The HEAD should be changed.
+# FIXME: Mark this test as test_expect_failure. Remove the FIXME and
+# mark as test_expect_success when this test successes (fixed bug).
+test_expect_failure '"bisect skip: bisection is started with --term*"' '
+ git bisect start --term-new=fixed --term-old=unfixed $HASH5 $HASH1 &&
+ 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
+'
+
HASH6=
test_expect_success 'bisect run & skip: cannot tell between 2' '
add_line_into_file "6: Yet a line." hello &&
Trygve Aaberge reported [1] git bisect breakage when the bisection is started with --term* arguments (--term-new and --term-old). In that case, skipping with `git bisect skip` should cause HEAD to be changed, but actually the HEAD stayed same after skipping. Let's add the test to catch the breakage. Because there isn't any fixes yet, mark the test as test_expect_failure. [1]: https://lore.kernel.org/git/20210418151459.GC10839@aaberge.net/ Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> --- Junio suggested that I should had written this test in t6030, not in separate script as per [2], so that I could reuse the history from existing tests. [2]: https://lore.kernel.org/git/xmqqa6przh08.fsf@gitster.g/ t/t6030-bisect-porcelain.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) base-commit: 311531c9de557d25ac087c1637818bd2aad6eb3a