Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Estabrooks <seanlkml@sympatico.ca>2007-08-18 01:38:25 +0400
committerJunio C Hamano <gitster@pobox.com>2007-08-23 02:38:37 +0400
commit412876dcbb7ca10e64ed8118bc1995788d397782 (patch)
tree4290d579ad4132ff71b85d87d1aa0754dc9d725b
parent63c2bd25d685faeed2c1e486cd957daaaaac7052 (diff)
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>
-rwxr-xr-xgit-send-email.perl3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 69559b289a..f1a8855682 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -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) = @_;