diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-03-21 15:14:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-21 15:14:24 -0700 |
commit | 214919b4f6a4ef69406d9383038f2a1a75476032 (patch) | |
tree | 85e9a0bb7e1c0c394302d0ff97c4d0d975f87f7e /add-interactive.c | |
parent | 7391ecd338edcd0317687399c915927c1b4e25dd (diff) | |
parent | ac618c418e5e16acd82dc3d8e4356a39150de5a2 (diff) | |
download | git-214919b4f6a4ef69406d9383038f2a1a75476032.tar.gz |
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
Diffstat (limited to 'add-interactive.c')
-rw-r--r-- | add-interactive.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/add-interactive.c b/add-interactive.c index e1ab39cce3..7247210301 100644 --- a/add-interactive.c +++ b/add-interactive.c @@ -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) |