Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-06 10:27:44 +0400
committerJunio C Hamano <junkio@cox.net>2007-04-07 04:55:57 +0400
commit0a5280a9f444c33b0e4ebf2f073df5899c112cf8 (patch)
treecd6e6a6ceda6d4019ef1a0610646e05a95b32c73 /t
parent4f50671699090089b7967880f9b0291391c8de1a (diff)
git-bisect: allow bisecting with only one bad commit.
This allows you to say: git bisect start git bisect bad $bad git bisect next to start bisection without knowing a good commit. This would have you try a commit that is half-way since the beginning of the history, which is rather wasteful if you already know a good commit, but if you don't (or your history is short enough that you do not care), there is no reason not to allow this. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t6030-bisect-run.sh17
1 files changed, 6 insertions, 11 deletions
diff --git a/t/t6030-bisect-run.sh b/t/t6030-bisect-run.sh
index 4910ff6841..de3123522a 100755
--- a/t/t6030-bisect-run.sh
+++ b/t/t6030-bisect-run.sh
@@ -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