diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-05 23:27:44 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-06 17:55:57 -0700 |
commit | 0a5280a9f444c33b0e4ebf2f073df5899c112cf8 (patch) | |
tree | cd6e6a6ceda6d4019ef1a0610646e05a95b32c73 /t | |
parent | 4f50671699090089b7967880f9b0291391c8de1a (diff) | |
download | git-0a5280a9f444c33b0e4ebf2f073df5899c112cf8.tar.gz |
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-x | t/t6030-bisect-run.sh | 17 |
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 |