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>
Christian Couder committed
Mar 27, 2007 at 06:49 UTC
8302012097f68caba5be82ba37b191b317886f2b
1 file changed
+8
git-bisect.sh
+8
@@ -223,6 +223,14 @@ bisect_replay () {
223
}
224
225
bisect_run () {
226
+ # Check that we have everything to run correctly.
227
+ test -d "$GIT_DIR/refs/bisect" || {
228
+ echo >&2 'You need to start by "git bisect start".'
229
+ echo >&2 'And then by "git bisect bad" and "git bisect good".'
230
+ exit 1
231
+ }
232
+ bisect_next_check fail
233
+
234
while true
235
do
236
echo "running $@"