| 912 | } |
| 913 | |
| 914 | static int bisect_autostart(struct bisect_terms *terms) |
| 915 | { |
| 916 | int res; |
| 917 | const char *yesno; |
| 918 | |
| 919 | if (file_is_not_empty(git_path_bisect_start())) |
| 920 | return 0; |
| 921 | |
| 922 | fprintf_ln(stderr, _("You need to start by \"git bisect " |
| 923 | "start\"\n")); |
| 924 | |
| 925 | if (!isatty(STDIN_FILENO)) |
| 926 | return -1; |
| 927 | |
| 928 | /* |
| 929 | * TRANSLATORS: Make sure to include [Y] and [n] in your |
| 930 | * translation. The program will only accept English input |
| 931 | * at this point. |
| 932 | */ |
| 933 | yesno = git_prompt(_("Do you want me to do it for you " |
| 934 | "[Y/n]? "), PROMPT_ECHO); |
| 935 | res = tolower(*yesno) == 'n' ? |
| 936 | -1 : bisect_start(terms, 0, empty_strvec); |
| 937 | |
| 938 | return res; |
| 939 | } |
| 940 | |
| 941 | static enum bisect_error bisect_state(struct bisect_terms *terms, int argc, |
| 942 | const char **argv) |
no test coverage detected