git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
PGPhillip Wood via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 16, 2022, 10:54 UTC
Message-ID
<pull.1146.git.1645008873.gitgitgadget@gmail.com>

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
Next: Phillip Wood via GitGitGadget
Message 1 of 18 in “a couple of read_key_without_echo() fixes”
  1. 0/3 a couple of read_key_without_echo() fixesPhillip Wood via GitGitGadget, Feb 16, 2022
  2. 1/3 terminal: pop signal handler when terminal is restoredPhillip Wood via GitGitGadget, Feb 16, 2022
  3. 2/3 terminal: set VMIN and VTIME in non-canonical modePhillip Wood via GitGitGadget, Feb 16, 2022
  4. Junio C HamanoFeb 16, 2022
  5. Phillip WoodFeb 17, 2022
  6. 3/3 add -p: disable stdin buffering when interactive.singlekey is setPhillip Wood via GitGitGadget, Feb 16, 2022
  7. Junio C HamanoFeb 16, 2022
  8. 0/4 a couple of read_key_without_echo() fixesPhillip Wood via GitGitGadget, Feb 22, 2022
  9. 1/4 terminal: always reset terminal when reading without echoPhillip Wood via GitGitGadget, Feb 22, 2022
  10. 2/4 terminal: pop signal handler when terminal is restoredPhillip Wood via GitGitGadget, Feb 22, 2022
  11. 3/4 terminal: set VMIN and VTIME in non-canonical modePhillip Wood via GitGitGadget, Feb 22, 2022
  12. 4/4 add -p: disable stdin buffering when interactive.singlekey is setPhillip Wood via GitGitGadget, Feb 22, 2022
  13. Junio C HamanoFeb 23, 2022
  14. Phillip WoodFeb 24, 2022
  15. Carlo ArenasMar 22, 2022
  16. Junio C HamanoMar 23, 2022
  17. Johannes SchindelinMar 24, 2022
  18. Phillip WoodMar 28, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.