{"thread":{"id":"7445","subject":"[PATCH] Bisect: Improve error message in \"bisect_next_check\".","startedAt":"2007-03-28T03:19:53Z","lastAt":"2007-03-28T03:19:53Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"38226","messageId":"20070328051953.82456ba6.chriscool@tuxfamily.org","threadId":"7445","inReplyTo":null,"subject":"[PATCH] Bisect: Improve error message in \"bisect_next_check\".","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-03-28T03:19:53Z","receivedAt":"2007-03-28T03:19:53Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"So we can remove the specific message in \"bisect_run\".\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n\nJunio C Hamano wrote:\n\n> Doesn't that suggest the existing messages from \"git bisect good/bad\"\n> can use the same improvement you added only to \"bisect run\"?\n\nYou mean something like this patch ?\n\n\n git-bisect.sh |   13 ++++++-------\n 1 files changed, 6 insertions(+), 7 deletions(-)\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 57d6754..47f0b8b 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -123,7 +123,12 @@ bisect_next_check() {\n \tcase \"$next_ok,$1\" in\n \tno,) false ;;\n \tno,fail)\n-\t    echo >&2 'You need to give me at least one good and one bad revisions.'\n+\t    USE_START=''\n+\t    test -d \"$GIT_DIR/refs/bisect\" ||\n+\t        USE_START='start by \"git bisect start\" and then'\n+\t    echo >&2 'You need to' $USE_START\\\n+\t\t'give me at least one good and one bad revisions' \\\n+\t\t'by \"git bisect good\" and \"git bisect bad\".'\n \t    exit 1 ;;\n \t*)\n \t    true ;;\n@@ -223,12 +228,6 @@ bisect_replay () {\n }\n \n bisect_run () {\n-    # Check that we have everything to run correctly.\n-    test -d \"$GIT_DIR/refs/bisect\" || {\n-\techo >&2 'You need to start by \"git bisect start\".'\n-\techo >&2 'And then by \"git bisect bad\" and \"git bisect good\".'\n-\texit 1\n-    }\n     bisect_next_check fail\n \n     while true\n-- \n1.5.1.rc2.15.g465b3-dirty\n"}]}