summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 91286ca)
raw | patch | inline | side by side (parent: 91286ca)
author | Jay Soffian <jaysoffian@gmail.com> | |
Tue, 31 Mar 2009 16:22:11 +0000 (12:22 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 1 Apr 2009 18:10:06 +0000 (11:10 -0700) |
Attempting to prompt when the tty is closed (typically when running from
cron) is pointless and emits a warning. This patch causes ask() to
return early, squelching the warning.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cron) is pointless and emits a warning. This patch causes ask() to
return early, squelching the warning.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 5916c86b6874c5d39952fc9565ad0e24e301bbb9..d790660bcf7bdc68a8edee6a2826447da931a9cc 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
my $default = $arg{default};
my $resp;
my $i = 0;
+ return defined $default ? $default : undef
+ unless defined $term->IN and defined fileno($term->IN) and
+ defined $term->OUT and defined fileno($term->OUT);
while ($i++ < 10) {
$resp = $term->readline($prompt);
if (!defined $resp) { # EOF