MCPcopy Index your code
hub / github.com/git/git / read_single_character

Function read_single_character

add-patch.c:1362–1373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1360}
1361
1362static 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
1375static int prompt_yesno(struct add_p_state *s, const char *prompt)
1376{

Callers 2

prompt_yesnoFunction · 0.85
patch_update_fileFunction · 0.85

Calls 2

read_key_without_echoFunction · 0.85

Tested by

no test coverage detected