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>
This commit is contained in:
committed by
Junio C Hamano
parent
225bc32a98
commit
e22b245ea5
@ -1,6 +1,9 @@
|
||||
#ifndef COMPAT_TERMINAL_H
|
||||
#define COMPAT_TERMINAL_H
|
||||
|
||||
int save_term(int full_duplex);
|
||||
void restore_term(void);
|
||||
|
||||
char *git_terminal_prompt(const char *prompt, int echo);
|
||||
|
||||
/* Read a single keystroke, without echoing it to the terminal */
|
||||
|
||||
Reference in New Issue
Block a user