]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t6030-bisect-run.sh
git-bisect: allow bisecting with only one bad commit.
[thirdparty/git.git] / t / t6030-bisect-run.sh
index 4910ff68416c8d59da6851459debeb198987b7c7..de3123522aba7d4a371cc30d8fbbd74f4d063d19 100755 (executable)
@@ -4,6 +4,8 @@
 #
 test_description='Tests git-bisect functionality'
 
+exec </dev/null
+
 . ./test-lib.sh
 
 add_line_into_file()
@@ -37,21 +39,14 @@ test_expect_success \
      HASH3=$(git rev-list HEAD | head -2 | tail -1) &&
      HASH4=$(git rev-list HEAD | head -1)'
 
-test_expect_success 'bisect does not start with only one bad' '
+test_expect_success 'bisect starts with only one bad' '
        git bisect reset &&
        git bisect start &&
-       git bisect bad $HASH4 || return 1
-
-       if git bisect next
-       then
-               echo Oops, should have failed.
-               false
-       else
-               :
-       fi
+       git bisect bad $HASH4 &&
+       git bisect next
 '
 
-test_expect_success 'bisect does not start with only one good' '
+test_expect_success 'bisect starts with only one good' '
        git bisect reset &&
        git bisect start &&
        git bisect good $HASH1 || return 1