diff --git a/git-bisect.sh b/git-bisect.sh
index 936b4a4b835e51410ccfbb37f4205accbade4422..11313a7949909f61f47ccc061cfc6390b225c630 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
case "$next_ok,$1" in
no,) false ;;
no,fail)
- echo >&2 'You need to give me at least one good and one bad revisions.'
+ THEN=''
+ test -d "$GIT_DIR/refs/bisect" || {
+ echo >&2 'You need to start by "git bisect start".'
+ THEN='then '
+ }
+ echo >&2 'You '$THEN'need to give me at least one good' \
+ 'and one bad revisions.'
+ echo >&2 '(You can use "git bisect bad" and' \
+ '"git bisect good" for that.)'
exit 1 ;;
*)
true ;;
else
branch=master
fi ;;
- 1) test -f "$GIT_DIR/refs/heads/$1" || {
+ 1) git-show-ref --verify --quiet -- "refs/heads/$1" || {
echo >&2 "$1 does not seem to be a valid branch"
exit 1
}
}
bisect_run () {
+ bisect_next_check fail
+
while true
do
echo "running $@"