summaryrefslogtreecommitdiff
path: root/compat/terminal.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-10-18 15:47:57 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-18 15:47:57 -0700
commit853ec9aa9be1b467986dd86ffc36c1c8580a6789 (patch)
tree1c24566cefb68c6becf674e5955698be29bfeb9a /compat/terminal.h
parentMerge branch 'ab/designated-initializers-more' (diff)
parenteditor: save and reset terminal after calling EDITOR (diff)
downloadtgif-853ec9aa9be1b467986dd86ffc36c1c8580a6789.tar.xz
Merge branch 'cm/save-restore-terminal'
An editor session launched during a Git operation (e.g. during 'git commit') can leave the terminal in a funny state. The code path has updated to save the terminal state before, and restore it after, it spawns an editor. * cm/save-restore-terminal: editor: save and reset terminal after calling EDITOR terminal: teach git how to save/restore its terminal settings
Diffstat (limited to 'compat/terminal.h')
-rw-r--r--compat/terminal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/terminal.h b/compat/terminal.h
index a9d52b8464..e1770c575b 100644
--- a/compat/terminal.h
+++ b/compat/terminal.h
@@ -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 */