aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 8e6f3b22c..e5d67f1b6 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -166,7 +166,9 @@ my $envelope_sender;
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";
@@ -407,8 +409,9 @@ if ($thread && !defined $initial_reply_to && $prompting) {
$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) {