Skip to content

Commit ba7eafe

Browse files
pranitbauva1997gitster
authored andcommitted
t6030: explicitly test for bisection cleanup
Add test to explicitly check that 'git bisect reset' is working as expected. This is already covered implicitly by the test suite. Mentored-by: Lars Schneider <larsxschneider@gmail.com> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent fb71a32 commit ba7eafe

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

t/t6030-bisect-porcelain.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,4 +894,21 @@ test_expect_success 'bisect start takes options and revs in any order' '
894894
test_cmp expected actual
895895
'
896896

897+
test_expect_success 'git bisect reset cleans bisection state properly' '
898+
git bisect reset &&
899+
git bisect start &&
900+
git bisect good $HASH1 &&
901+
git bisect bad $HASH4 &&
902+
git bisect reset &&
903+
test -z "$(git for-each-ref "refs/bisect/*")" &&
904+
test_path_is_missing "$GIT_DIR/BISECT_EXPECTED_REV" &&
905+
test_path_is_missing "$GIT_DIR/BISECT_ANCESTORS_OK" &&
906+
test_path_is_missing "$GIT_DIR/BISECT_LOG" &&
907+
test_path_is_missing "$GIT_DIR/BISECT_RUN" &&
908+
test_path_is_missing "$GIT_DIR/BISECT_TERMS" &&
909+
test_path_is_missing "$GIT_DIR/head-name" &&
910+
test_path_is_missing "$GIT_DIR/BISECT_HEAD" &&
911+
test_path_is_missing "$GIT_DIR/BISECT_START"
912+
'
913+
897914
test_done

0 commit comments

Comments
 (0)