terminal: teach git how to save/restore its terminal settings
commite22b245ea576bf1787284971b467f45f45045f97
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Tue, 5 Oct 2021 07:46:47 +0000 (5 00:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Oct 2021 15:53:00 +0000 (6 08:53 -0700)
treebd722bf454bef4e29ced13c9d6cb11efda44668f
parent225bc32a989d7a22fa6addafd4ce7dcd04675dbf
terminal: teach git how to save/restore its terminal settings

Currently, git will share its console with all its children (unless
they create their own), and is therefore possible that any of them
that might change the settings for it could affect its operations once
completed.

Refactor the platform specific functionality to save the terminal
settings and expand it to also do so for the output handler.

This will allow for the state of the terminal to be saved and
restored around a child that might misbehave (ex vi) which will
be implemented next.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/terminal.c
compat/terminal.h