From: Pádraig Brady
Date: Sat, 29 Nov 2025 20:36:14 +0000 (+0000) Subject: maint: commit-msg: fix terminal corruption when re-editing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47b58df1bb5ad6c856d11cdd98aa3ce48d5e473f;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index bdea8c38d3..05dce1ebb9 100755 --- a/scripts/git-hooks/commit-msg +++ b/scripts/git-hooks/commit-msg @@ -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 2>&1"; ($? & 127) || ($? >> 8) and die "$ME: $log_file: the editor ($editor) failed, aborting\n"; }