summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Christian Couder <chriscool@tuxfamily.org>2007-03-27 06:49:57 +0200
committerLibravatar Junio C Hamano <junkio@cox.net>2007-03-27 12:48:30 -0700
commit8302012097f68caba5be82ba37b191b317886f2b (patch)
tree46da455abed74fa6c498c1369cb0d7c18f8b9309
parentsha1_file.c (write_sha1_from_fd): Detect close failure. (diff)
downloadtgif-8302012097f68caba5be82ba37b191b317886f2b.tar.xz
Bisect: add checks at the beginning of "git bisect run".
We may be able to "run" with only one good revision given and then verify that the result of the first run is bad. And perhaps also the other way around. But for now let's check that we have at least one bad and one good revision before we start to run. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-bisect.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index fda1712a08..57d6754d34 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -223,6 +223,14 @@ bisect_replay () {
}
bisect_run () {
+ # Check that we have everything to run correctly.
+ test -d "$GIT_DIR/refs/bisect" || {
+ echo >&2 'You need to start by "git bisect start".'
+ echo >&2 'And then by "git bisect bad" and "git bisect good".'
+ exit 1
+ }
+ bisect_next_check fail
+
while true
do
echo "running $@"