diff --git a/git-send-email.perl b/git-send-email.perl
index 8e6f3b22c83d25a46069c48c13a0eebbd2196ec2..e5d67f1b6c3237ff67673037be5ca8997cdb191d 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
my $repo = Git->repository();
my $term = eval {
- new Term::ReadLine 'git-send-email';
+ $ENV{"GIT_SEND_EMAIL_NOTTY"}
+ ? new Term::ReadLine 'git-send-email', \*STDIN, \*STDOUT
+ : new Term::ReadLine 'git-send-email';
};
if ($@) {
$term = new FakeTerm "$@: going non-interactive";
$initial_reply_to = $_;
}
if (defined $initial_reply_to) {
- $initial_reply_to =~ s/^\s*<?/</;
- $initial_reply_to =~ s/>?\s*$/>/;
+ $initial_reply_to =~ s/^\s*<?//;
+ $initial_reply_to =~ s/>?\s*$//;
+ $initial_reply_to = "<$initial_reply_to>" if $initial_reply_to ne '';
}
if (!defined $smtp_server) {