From: Junio C Hamano Date: Tue, 12 Feb 2008 00:46:36 +0000 (-0800) Subject: Merge branch 'mw/send-email' X-Git-Tag: v1.5.5-rc0~229 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e3560df69d5ff8047bb82524ef23f7c08c729b64;p=git-core%2Fgit.git Merge branch 'mw/send-email' * mw/send-email: git-send-email: Better handling of EOF git-send-email: SIG{TERM,INT} handlers git-send-email: ssh/login style password requests --- e3560df69d5ff8047bb82524ef23f7c08c729b64 diff --cc git-send-email.perl index 8de5789f6,9d7c1f467..59601e36e --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -183,10 -175,9 +181,10 @@@ my ($quiet, $dry_run) = (0, 0) # Variables with corresponding config settings my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd); - my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_authpass, $smtp_ssl); + my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_ssl); my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts); my ($no_validate); +my (@suppress_cc); my %config_bool_settings = ( "thread" => [\$thread, 1], @@@ -206,9 -197,31 +204,32 @@@ my %config_settings = "aliasfiletype" => \$aliasfiletype, "bcc" => \@bcclist, "aliasesfile" => \@alias_files, + "suppresscc" => \@suppress_cc, ); + # Handle Uncouth Termination + sub signal_handler { + + # Make text normal + print color("reset"), "\n"; + + # SMTP password masked + system "stty echo"; + + # tmp files from --compose + if (-e $compose_filename) { + print "'$compose_filename' contains an intermediate version of the email you were composing.\n"; + } + if (-e ($compose_filename . ".final")) { + print "'$compose_filename.final' contains the composed email.\n" + } + + exit; + }; + + $SIG{TERM} = \&signal_handler; + $SIG{INT} = \&signal_handler; + # Begin by accumulating all the variables (defined above), that we will end up # needing, first, from the command line: