mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-27 01:44:21 +00:00
maint: commit-msg: fix terminal corruption when re-editing
* scripts/git-hooks/commit-msg: Explicitly connect the editor to /dev/tty, so that it can restore terminal settings appropriately.
This commit is contained in:
parent
68e39a581a
commit
47b58df1bb
@ -49,7 +49,7 @@ sub re_edit($)
|
||||
|
||||
warn "Interrupt (Ctrl-C) to abort...\n";
|
||||
|
||||
system 'sh', '-c', "$editor $log_file";
|
||||
system 'sh', '-c', "$editor $log_file </dev/tty >/dev/tty 2>&1";
|
||||
($? & 127) || ($? >> 8)
|
||||
and die "$ME: $log_file: the editor ($editor) failed, aborting\n";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user