| 1360 | } |
| 1361 | |
| 1362 | static int read_single_character(struct add_p_state *s) |
| 1363 | { |
| 1364 | if (s->cfg.use_single_key) { |
| 1365 | int res = read_key_without_echo(&s->answer); |
| 1366 | printf("%s\n", res == EOF ? "" : s->answer.buf); |
| 1367 | return res; |
| 1368 | } |
| 1369 | |
| 1370 | if (git_read_line_interactively(&s->answer) == EOF) |
| 1371 | return EOF; |
| 1372 | return 0; |
| 1373 | } |
| 1374 | |
| 1375 | static int prompt_yesno(struct add_p_state *s, const char *prompt) |
| 1376 | { |
no test coverage detected