[PATCH 06/27] bisect: Fixup bisect-porcelain/40
- From
- Jan Kara <jack@suse.cz>
- Date
- Nov 18, 2021, 16:49 UTC
- Message-ID
- <20211118164940.8818-7-jack@suse.cz>
- In-Reply-To
- <20211118164940.8818-1-jack@suse.cz>
Test 40 from t6030-bisect-porcelain.sh assumes that bisection algorithm suggests HASH6 after merge base when HASH5 is an equivalent choice. Fix the test to work in both cases.
Signed-off-by: Jan Kara <jack@suse.cz> --- t/t6030-bisect-porcelain.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index ed81a6403b63..0f2a91996393 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -524,8 +524,9 @@ test_expect_success 'optimized merge base checks' ' grep "$HASH4" my_bisect_log.txt && git bisect good > my_bisect_log2.txt && test -f ".git/BISECT_ANCESTORS_OK" && - test "$HASH6" = $(git rev-parse --verify HEAD) && - git bisect bad && + rev_hash=$(git rev-parse --verify HEAD) && + test "$HASH5" = "$rev_hash" -o "$HASH6" = "$rev_hash" && + git bisect bad "$HASH6" && git bisect good "$A_HASH" > my_bisect_log4.txt && test_i18ngrep "merge base must be tested" my_bisect_log4.txt && test_path_is_missing ".git/BISECT_ANCESTORS_OK"
-- 2.26.2