Thread (9 messages) 9 messages, 1 author, 2022-02-22
STALE1576d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 0/3] a couple of read_key_without_echo() fixes

From: Phillip Wood via GitGitGadget <hidden>
Date: 2022-02-16 10:54:39

Fix a couple of bugs I noticed when using the builtin "add -p" with
interactive.singlekey=true. The first patch is a general fix for the
terminal save/restore functionality which forgot to call sigchain_pop() when
it restored the terminal. The last two fix reading single keys in
non-canonical mode by making sure we wait for an initial key press and only
read one byte at a time from the underlying file descriptor.

Note that these are untested on windows beyond our CI compiling them

Phillip Wood (3):
  terminal: pop signal handler when terminal is restored
  terminal: set VMIN and VTIME in non-canonical mode
  add -p: disable stdin buffering when interactive.singlekey is set

 add-interactive.c |  2 ++
 compat/terminal.c | 27 ++++++++++++++++++++++-----
 compat/terminal.h |  8 ++++++++
 3 files changed, 32 insertions(+), 5 deletions(-)


base-commit: b80121027d1247a0754b3cc46897fee75c050b44
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1146%2Fphillipwood%2Fwip%2Fadd-p-vmin-v2-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1146/phillipwood/wip/add-p-vmin-v2-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1146
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help