| 380 | "You can use \"git bisect %s\" and \"git bisect %s\" for that."); |
| 381 | |
| 382 | static int decide_next(const struct bisect_terms *terms, |
| 383 | const char *current_term, int missing_good, |
| 384 | int missing_bad) |
| 385 | { |
| 386 | if (!missing_good && !missing_bad) |
| 387 | return 0; |
| 388 | if (!current_term) |
| 389 | return -1; |
| 390 | |
| 391 | if (missing_good && !missing_bad && |
| 392 | !strcmp(current_term, terms->term_good)) { |
| 393 | char *yesno; |
| 394 | /* |
| 395 | * have bad (or new) but not good (or old). We could bisect |
| 396 | * although this is less optimum. |
| 397 | */ |
| 398 | warning(_("bisecting only with a %s commit"), terms->term_bad); |
| 399 | if (!isatty(0)) |
| 400 | return 0; |
| 401 | /* |
| 402 | * TRANSLATORS: Make sure to include [Y] and [n] in your |
| 403 | * translation. The program will only accept English input |
| 404 | * at this point. |
| 405 | */ |
| 406 | yesno = git_prompt(_("Are you sure [Y/n]? "), PROMPT_ECHO); |
| 407 | if (starts_with(yesno, "N") || starts_with(yesno, "n")) |
| 408 | return -1; |
| 409 | return 0; |
| 410 | } |
| 411 | |
| 412 | if (!is_empty_or_missing_file(git_path_bisect_start())) |
| 413 | return error(_(need_bad_and_good_revision_warning), |
| 414 | vocab_bad, vocab_good, vocab_bad, vocab_good); |
| 415 | else |
| 416 | return error(_(need_bisect_start_warning), |
| 417 | vocab_good, vocab_bad, vocab_good, vocab_bad); |
| 418 | } |
| 419 | |
| 420 | static void bisect_status(struct bisect_state *state, |
| 421 | const struct bisect_terms *terms) |
no test coverage detected