1
0
mirror of https://github.com/git/git.git synced 2024-09-28 19:42:15 +02:00

Reset terminal attributes when terminating git send-email

If you break out of the prompts presented to you by git send-email
your terminal can be left in an inconsistent state.  Here we trap
the interrupt signal and reset the terminal before exiting.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Sean Estabrooks 2007-08-17 17:38:25 -04:00 committed by Junio C Hamano
parent 63c2bd25d6
commit 412876dcbb

@ -21,8 +21,11 @@ use warnings;
use Term::ReadLine;
use Getopt::Long;
use Data::Dumper;
use Term::ANSIColor;
use Git;
$SIG{INT} = sub { print color("reset"), "\n"; exit };
package FakeTerm;
sub new {
my ($class, $reason) = @_;