Re: [PATCH v2 0/4] builtin add -p: hopefully final readkey fixes
From: Junio C Hamano <hidden>
Date: 2022-03-09 23:10:16
Phillip Wood [off-list ref] writes:
V1 Cover Letter: Fix the remaining issues that I'm aware of when using the built in "add -p" with interactive.singlekey that are stopping it from being merged to master. The first three patches make sure that we call tcsetattr() and the same file descriptor that we use for read() and work around poll() being broken when reading from terminals on macos. The final patch is more of an improvement rather than a bug fix (the same issue already exists in the perl version) and could proceed separately. Unfortunately these patches conflict with 'cb/save-term-across-editor-invocation' as well as the textual conflicts there is a semantic conflict as the argument to save_term() is changed so the code in editor.c will need updating. These patches are based on 'pw/single-key-interactive'
Is it still true, or does the base only apply to v1? $ git checkout --detach pw/single-key-interactive HEAD is now at ac618c418e add -p: disable stdin buffering when interactive.singlekey is set $ git am -s ./+pw4-v2-add-p-single Applying: terminal: use flags for save_term() Applying: terminal: don't assume stdin is /dev/tty Applying: terminal: work around macos poll() bug error: patch failed: compat/terminal.c:397 error: compat/terminal.c: patch does not apply Patch failed at 0003 terminal: work around macos poll() bug hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". $ exit