Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-22 01:14:24 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-22 01:14:24 +0300
commit214919b4f6a4ef69406d9383038f2a1a75476032 (patch)
tree85e9a0bb7e1c0c394302d0ff97c4d0d975f87f7e /add-interactive.c
parent7391ecd338edcd0317687399c915927c1b4e25dd (diff)
parentac618c418e5e16acd82dc3d8e4356a39150de5a2 (diff)
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.c2
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)