Merge branch 'pw/single-key-interactive'

The single-key interactive operation used by "git add -p" has been
made more robust.

* pw/single-key-interactive:
  add -p: disable stdin buffering when interactive.singlekey is set
  terminal: set VMIN and VTIME in non-canonical mode
  terminal: pop signal handler when terminal is restored
  terminal: always reset terminal when reading without echo
This commit is contained in:
Junio C Hamano
2022-03-21 15:14:24 -07:00
3 changed files with 33 additions and 6 deletions

View File

@ -70,6 +70,8 @@ void init_add_i_state(struct add_i_state *s, struct repository *r)
&s->interactive_diff_algorithm);
git_config_get_bool("interactive.singlekey", &s->use_single_key);
if (s->use_single_key)
setbuf(stdin, NULL);
}
void clear_add_i_state(struct add_i_state *s)