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>
Pranit Bauva committed
Sep 29, 2017 at 06:49 UTC
ba7eafe14621a9be80e41ecd1ff616bc66cbc1bf
1 file changed
+17
t/t6030-bisect-porcelain.sh
+17
@@ -894,4 +894,21 @@ test_expect_success 'bisect start takes options and revs in any order' '
894
test_cmp expected actual
895
'
896
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
+
914
test_done