@matheusbsbs / matheus-bagliano / commits / 6f01e6b370
Fork 0

Bisect: Improve error message in "bisect_next_check".

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>

Christian Couder committed Mar 29, 2007 at 09:42 UTC 6f01e6b37008e45efb2b17a027f045600a011e93
1 file changed +9 -7
git-bisect.sh
+9 -7
@@ -123,7 +123,15 @@ bisect_next_check() {
123 case "$next_ok,$1" in
124 no,) false ;;
125 no,fail)
126 - echo >&2 'You need to give me at least one good and one bad revisions.'
126 + THEN=''
127 + test -d "$GIT_DIR/refs/bisect" || {
128 + echo >&2 'You need to start by "git bisect start".'
129 + THEN='then '
130 + }
131 + echo >&2 'You '$THEN'need to give me at least one good' \
132 + 'and one bad revisions.'
133 + echo >&2 '(You can use "git bisect bad" and' \
134 + '"git bisect good" for that.)'
135 exit 1 ;;
136 *)
137 true ;;
@@ -223,12 +231,6 @@ bisect_replay () {
231 }
232
233 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 - }
234 bisect_next_check fail
235
236 while true