git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] protect git from a rogue editor
@ 2021-10-02 15:36 Carlo Marcelo Arenas Belón
  2021-10-02 15:36 ` [RFC PATCH 1/2] terminal: teach git how to save/restore its terminal settings Carlo Marcelo Arenas Belón
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2021-10-02 15:36 UTC (permalink / raw)
  To: git; +Cc: Carlo Marcelo Arenas Belón

The following series, expands git's terminal support to allow for
saving/restoring its settings around an EDITOR call.

The rationale is better documented in multiple tickets for Windows
users that had found themselves with a difficult to read output after
doing a commit (either directly or while running a rebase), because
they were using Windows Terminal and vi (the default).

It is also useful in POSIX systems which before this series will have
to reset their terminals, if (for example) vi got killed while editing
a commit message.

Posted as an RFC, because I suspect it might need additional changes
to support Windows < 10 and because I wanted to add a patch that at
least renames the "hconin" variable and maybe fix some spurious errors,
or even add some logic to prevent the reset if the terminal wasn't
messed with.

Carlo Marcelo Arenas Belón (2):
  terminal: teach git how to save/restore its terminal settings
  editor: save and reset terminal after calling EDITOR

 compat/terminal.c | 72 ++++++++++++++++++++++++++++++++++++++---------
 compat/terminal.h |  3 ++
 editor.c          |  4 +++
 3 files changed, 66 insertions(+), 13 deletions(-)

-- 
2.33.0.955.gee03ddbf0e


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-10-05  7:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 15:36 [RFC PATCH 0/2] protect git from a rogue editor Carlo Marcelo Arenas Belón
2021-10-02 15:36 ` [RFC PATCH 1/2] terminal: teach git how to save/restore its terminal settings Carlo Marcelo Arenas Belón
2021-10-02 15:36 ` [RFC PATCH 2/2] editor: save and reset terminal after calling EDITOR Carlo Marcelo Arenas Belón
2021-10-04  7:25 ` [PATCH 0/2] protect git from a rogue editor Carlo Marcelo Arenas Belón
2021-10-04  7:25   ` [PATCH 1/2] terminal: teach git how to save/restore its terminal settings Carlo Marcelo Arenas Belón
2021-10-04 16:36     ` Junio C Hamano
2021-10-04 17:27       ` Carlo Arenas
2021-10-04 18:10         ` Junio C Hamano
2021-10-04 18:33           ` Carlo Arenas
2021-10-04  7:26   ` [PATCH 2/2] editor: save and reset terminal after calling EDITOR Carlo Marcelo Arenas Belón
2021-10-04 16:38   ` [PATCH 0/2] protect git from a rogue editor Junio C Hamano
2021-10-05  7:46   ` [PATCH v2 " Carlo Marcelo Arenas Belón
2021-10-05  7:46     ` [PATCH v2 1/2] terminal: teach git how to save/restore its terminal settings Carlo Marcelo Arenas Belón
2021-10-05  7:46     ` [PATCH v2 2/2] editor: save and reset terminal after calling EDITOR Carlo Marcelo Arenas Belón

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).