Test 50 from t6030-bisect-porcelain.sh assumes that bisection algorithm suggests BROKEN_HASH6 when BROKEN_HASH5 is an equivalent choice. Fix the test to work in both cases. Signed-off-by: Jan Kara <jack@xxxxxxx> --- t/t6030-bisect-porcelain.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index 4ec7b5b5a72e..79f253f01b00 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -689,10 +689,23 @@ check_same() test_cmp_rev "$1" "$2" } +check_oneof() +{ + base="$1" + shift + echo "Checking $base is among $@" && + for rev in "$@"; do + if test_cmp_rev "$base" "$rev"; then + return 0 + fi + done + return 1 +} + test_expect_success 'bisect: --no-checkout - start commit bad' ' git bisect reset && git bisect start BROKEN_HASH7 BROKEN_HASH4 --no-checkout && - check_same BROKEN_HASH6 BISECT_HEAD && + check_oneof BISECT_HEAD BROKEN_HASH5 BROKEN_HASH6 && git bisect reset ' -- 2.26.2