{"thread":{"id":"9566","subject":"[PATCH] Reset terminal attributes when terminating git send-email","startedAt":"2007-08-17T21:38:24Z","lastAt":"2007-08-17T22:35:44Z","messageCount":4,"participants":["Sean Estabrooks","Junio C Hamano","Sean"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50960","messageId":"11873867051906-git-send-email-seanlkml@sympatico.ca","threadId":"9566","inReplyTo":null,"subject":"[PATCH] Fix small typo in git send-email man page.","fromName":"Sean Estabrooks","fromEmail":"seanlkml@sympatico.ca","sentAt":"2007-08-17T21:38:24Z","receivedAt":"2007-08-17T21:38:24Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n---\n Documentation/git-send-email.txt |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex d243ed1..08a023e 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -62,7 +62,7 @@ The --cc option must be repeated for each user you want on the cc list.\n --signed-off-by-cc, --no-signed-off-by-cc::\n         If this is set, add emails found in Signed-off-by: or Cc: lines to the\n         cc list.\n-        Default is the value of 'sendemail.signedoffbycc' configuration value;\n+        Default is the value of 'sendemail.signedoffcc' configuration value;\n         if that is unspecified, default to --signed-off-by-cc.\n \n --quiet::\n-- \n1.5.3.rc5.18.gcb57\n"},{"id":"50959","messageId":"11873867051589-git-send-email-seanlkml@sympatico.ca","threadId":"9566","inReplyTo":"11873867051906-git-send-email-seanlkml@sympatico.ca","subject":"[PATCH] Reset terminal attributes when terminating git send-email","fromName":"Sean Estabrooks","fromEmail":"seanlkml@sympatico.ca","sentAt":"2007-08-17T21:38:25Z","receivedAt":"2007-08-17T21:38:25Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"If you break out of the prompts presented to you by git send-email\nyour terminal can be left in an inconsistent state.  Here we trap\nthe interrupt signal and reset the terminal before exiting.\n\nSigned-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n---\n git-send-email.perl |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 69559b2..f1a8855 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -21,8 +21,11 @@ use warnings;\n use Term::ReadLine;\n use Getopt::Long;\n use Data::Dumper;\n+use Term::ANSIColor;\n use Git;\n \n+$SIG{INT} = sub { print color(\"reset\"), \"\\n\"; exit };\n+\n package FakeTerm;\n sub new {\n \tmy ($class, $reason) = @_;\n-- \n1.5.3.rc5.18.gcb57\n"},{"id":"50962","messageId":"7vr6m1g5y4.fsf@gitster.siamese.dyndns.org","threadId":"9566","inReplyTo":"11873867051589-git-send-email-seanlkml@sympatico.ca","subject":"Re: [PATCH] Reset terminal attributes when terminating git send-email","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-17T22:19:15Z","receivedAt":"2007-08-17T22:19:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sean Estabrooks <seanlkml@sympatico.ca> writes:\n\n> If you break out of the prompts presented to you by git send-email\n> your terminal can be left in an inconsistent state.  Here we trap\n> the interrupt signal and reset the terminal before exiting.\n>\n> Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n> ---\n>  git-send-email.perl |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n>\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 69559b2..f1a8855 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -21,8 +21,11 @@ use warnings;\n>  use Term::ReadLine;\n>  use Getopt::Long;\n>  use Data::Dumper;\n> +use Term::ANSIColor;\n>  use Git;\n>  \n> +$SIG{INT} = sub { print color(\"reset\"), \"\\n\"; exit };\n> +\n>  package FakeTerm;\n>  sub new {\n>  \tmy ($class, $reason) = @_;\n\nI wonder if this is something Term::ReadLine when not using\nFakeTerm should and does provide...  Is this the standard\nworkaround all the applications that use Term::ReadLine need to\nimplement themselves?\n"},{"id":"50965","messageId":"20070817183544.f2897cb3.seanlkml@sympatico.ca","threadId":"9566","inReplyTo":"7vr6m1g5y4.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Reset terminal attributes when terminating git send-email","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2007-08-17T22:35:44Z","receivedAt":"2007-08-17T22:35:44Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Fri, 17 Aug 2007 15:19:15 -0700\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> I wonder if this is something Term::ReadLine when not using\n> FakeTerm should and does provide...  Is this the standard\n> workaround all the applications that use Term::ReadLine need to\n> implement themselves?\n\nUnfortunately Term::ReadLine (at least here with perl 5.8.8) does\nnot properly reset the terminal even when used in a test script\nwithout FakeTerm.   I don't know anything about perl and couldn't\nturn up any answers to this problem with Google, but maybe there\nis still a better solution known.  It would sure be much nicer if\nReadLine just took care of this detail itself.\n\nSean\n"}]}