Code

Revert "builtin-archive: use RUN_SETUP"
[git.git] / git-bisect.sh
index fda1712a085fa9271ea1a8e0e581c5d4c6801969..11313a7949909f61f47ccc061cfc6390b225c630 100755 (executable)
@@ -123,7 +123,15 @@ bisect_next_check() {
        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 ;;
@@ -223,6 +231,8 @@ bisect_replay () {
 }
 
 bisect_run () {
+    bisect_next_check fail
+
     while true
     do
       echo "running $@"