All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Phillip Wood via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
	"Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v2 0/4] a couple of read_key_without_echo() fixes
Date: Thu, 24 Feb 2022 14:30:08 +0000	[thread overview]
Message-ID: <8d44b509-ff19-0629-30f5-ae785c73c3aa@gmail.com> (raw)
In-Reply-To: <xmqqv8x5s1w3.fsf@gitster.g>

Hi Junio

On 23/02/2022 21:34, Junio C Hamano wrote:
> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> I have added a new patch to the beginning of the series that fixes a case
>> where we did not call restore_term() when leaving read_key_without_echo(). I
>> have also reworded the commit message to patch 2 as SIGINT is actually
>> ignored while the editor is running (we should probably change that code to
>> use wait_after_clean instead).
> 
> All patches looked good.  Thanks.
> 
> Let's mark it for 'next' and below soonish.

That sounds good. I've got a couple more patches based on top of these 
which hopefully fix the remaining problems (notably the macos poll() 
bug). I'll polish and post them next week. Once those are in I hope 
we'll be able to enable the builtin "add -p" by default.

Thanks

Phillip

>>
>> Cover letter for V1:
>>
>> 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 (4):
>>    terminal: always reset terminal when reading without echo
>>    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 | 29 +++++++++++++++++++++++------
>>   compat/terminal.h |  8 ++++++++
>>   3 files changed, 33 insertions(+), 6 deletions(-)
>>
>>
>> base-commit: b80121027d1247a0754b3cc46897fee75c050b44
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1146%2Fphillipwood%2Fwip%2Fadd-p-vmin-v2-v2
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1146/phillipwood/wip/add-p-vmin-v2-v2
>> Pull-Request: https://github.com/gitgitgadget/git/pull/1146
>>
>> Range-diff vs v1:
>>
>>   -:  ----------- > 1:  45609d61afc terminal: always reset terminal when reading without echo
>>   1:  9a3c2cea0f9 ! 2:  0020953f1cf terminal: pop signal handler when terminal is restored
>>       @@ Commit message
>>            external caller was removed by e3f7e01b50 ("Revert "editor: save and
>>            reset terminal after calling EDITOR"", 2021-11-22). Any future callers
>>            of save_term() should benefit from having the signal handler set up
>>       -    for them. For example if we reinstate the code to protect against an
>>       -    editor failing to restore the terminal attributes we would want that
>>       -    code to restore the terminal attributes on SIGINT. (As an aside
>>       -    run_command() installs a signal handler that waits for the child
>>       -    before re-raising the signal so we would be guaranteed to restore the
>>       -    settings after the child has exited.)
>>       +    for them.
>>        
>>            Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>>        
>>   2:  02009172e08 = 3:  7ae9b236554 terminal: set VMIN and VTIME in non-canonical mode
>>   3:  6d8423b6e1e = 4:  39b061a471b add -p: disable stdin buffering when interactive.singlekey is set

  reply	other threads:[~2022-02-24 14:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 10:54 [PATCH 0/3] a couple of read_key_without_echo() fixes Phillip Wood via GitGitGadget
2022-02-16 10:54 ` [PATCH 1/3] terminal: pop signal handler when terminal is restored Phillip Wood via GitGitGadget
2022-02-16 10:54 ` [PATCH 2/3] terminal: set VMIN and VTIME in non-canonical mode Phillip Wood via GitGitGadget
2022-02-16 21:40   ` Junio C Hamano
2022-02-17 10:59     ` Phillip Wood
2022-02-16 10:54 ` [PATCH 3/3] add -p: disable stdin buffering when interactive.singlekey is set Phillip Wood via GitGitGadget
2022-02-16 21:43   ` Junio C Hamano
2022-02-22 18:53 ` [PATCH v2 0/4] a couple of read_key_without_echo() fixes Phillip Wood via GitGitGadget
2022-02-22 18:53   ` [PATCH v2 1/4] terminal: always reset terminal when reading without echo Phillip Wood via GitGitGadget
2022-02-22 18:53   ` [PATCH v2 2/4] terminal: pop signal handler when terminal is restored Phillip Wood via GitGitGadget
2022-02-22 18:53   ` [PATCH v2 3/4] terminal: set VMIN and VTIME in non-canonical mode Phillip Wood via GitGitGadget
2022-02-22 18:53   ` [PATCH v2 4/4] add -p: disable stdin buffering when interactive.singlekey is set Phillip Wood via GitGitGadget
2022-02-23 21:34   ` [PATCH v2 0/4] a couple of read_key_without_echo() fixes Junio C Hamano
2022-02-24 14:30     ` Phillip Wood [this message]
2022-03-22 20:18       ` Carlo Arenas
2022-03-23  9:03         ` Junio C Hamano
2022-03-24 13:29           ` Johannes Schindelin
2022-03-28 10:51         ` Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d44b509-ff19-0629-30f5-ae785c73c3aa@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.