Skip to content

Commit

Permalink
Bisect: Improve error message in "bisect_next_check".
Browse files Browse the repository at this point in the history
So we can remove the specific message in "bisect_run".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Mar 30, 2007
1 parent 18acb3e commit 6f01e6b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;;
Expand Down Expand Up @@ -223,12 +231,6 @@ 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
Expand Down

0 comments on commit 6f01e6b

Please sign in to comment.