git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix small typo in git send-email man page.
@ 2007-08-17 21:38 Sean Estabrooks
  2007-08-17 21:38 ` [PATCH] Reset terminal attributes when terminating git send-email Sean Estabrooks
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Estabrooks @ 2007-08-17 21:38 UTC (permalink / raw)
  To: git

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
 Documentation/git-send-email.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index d243ed1..08a023e 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -62,7 +62,7 @@ The --cc option must be repeated for each user you want on the cc list.
 --signed-off-by-cc, --no-signed-off-by-cc::
         If this is set, add emails found in Signed-off-by: or Cc: lines to the
         cc list.
-        Default is the value of 'sendemail.signedoffbycc' configuration value;
+        Default is the value of 'sendemail.signedoffcc' configuration value;
         if that is unspecified, default to --signed-off-by-cc.
 
 --quiet::
-- 
1.5.3.rc5.18.gcb57

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Reset terminal attributes when terminating git send-email
  2007-08-17 21:38 [PATCH] Fix small typo in git send-email man page Sean Estabrooks
@ 2007-08-17 21:38 ` Sean Estabrooks
  2007-08-17 22:19   ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Estabrooks @ 2007-08-17 21:38 UTC (permalink / raw)
  To: git

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>
---
 git-send-email.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 69559b2..f1a8855 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) = @_;
-- 
1.5.3.rc5.18.gcb57

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Reset terminal attributes when terminating git send-email
  2007-08-17 21:38 ` [PATCH] Reset terminal attributes when terminating git send-email Sean Estabrooks
@ 2007-08-17 22:19   ` Junio C Hamano
  2007-08-17 22:35     ` Sean
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2007-08-17 22:19 UTC (permalink / raw)
  To: Sean Estabrooks; +Cc: git

Sean Estabrooks <seanlkml@sympatico.ca> writes:

> 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>
> ---
>  git-send-email.perl |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 69559b2..f1a8855 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) = @_;

I wonder if this is something Term::ReadLine when not using
FakeTerm should and does provide...  Is this the standard
workaround all the applications that use Term::ReadLine need to
implement themselves?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Reset terminal attributes when terminating git send-email
  2007-08-17 22:19   ` Junio C Hamano
@ 2007-08-17 22:35     ` Sean
  0 siblings, 0 replies; 4+ messages in thread
From: Sean @ 2007-08-17 22:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, 17 Aug 2007 15:19:15 -0700
Junio C Hamano <gitster@pobox.com> wrote:

> I wonder if this is something Term::ReadLine when not using
> FakeTerm should and does provide...  Is this the standard
> workaround all the applications that use Term::ReadLine need to
> implement themselves?

Unfortunately Term::ReadLine (at least here with perl 5.8.8) does
not properly reset the terminal even when used in a test script
without FakeTerm.   I don't know anything about perl and couldn't
turn up any answers to this problem with Google, but maybe there
is still a better solution known.  It would sure be much nicer if
ReadLine just took care of this detail itself.

Sean

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-17 22:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 21:38 [PATCH] Fix small typo in git send-email man page Sean Estabrooks
2007-08-17 21:38 ` [PATCH] Reset terminal attributes when terminating git send-email Sean Estabrooks
2007-08-17 22:19   ` Junio C Hamano
2007-08-17 22:35     ` Sean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).