git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/2] send-email: refactor and ensure prompting doesn't  loop forever
Date: Mon, 30 Mar 2009 12:04:50 -0400	[thread overview]
Message-ID: <76718490903300904k7e8c1054m99edb92d8d582387@mail.gmail.com> (raw)
In-Reply-To: <76718490903300845x14897599jc73f50a16b21605d@mail.gmail.com>

On Mon, Mar 30, 2009 at 11:45 AM, Jay Soffian <jaysoffian@gmail.com> wrote:
> Okay, well, I figured out how to work the polish. Term::ReadLine is
> attempting to use /dev/tty for input/output, which is closed. And
> because send-email enables warnings, its attempt to do so emits the
> messages you are seeing. Can you confirm that this patch squelches the
> warnings?

Ugh, not that. This:

diff --git a/git-send-email.perl b/git-send-email.perl
index f0405c8..81240ef 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -612,6 +612,9 @@ sub ask {
        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

j.

  reply	other threads:[~2009-03-30 16:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-29  1:39 [PATCH 1/2] send-email: refactor and ensure prompting doesn't loop forever Jay Soffian
2009-03-29  1:39 ` [PATCH 2/2] send-email: add tests for refactored prompting Jay Soffian
2009-03-31 10:33   ` Björn Steinbrink
2009-03-31 13:58     ` Jay Soffian
2009-03-31 14:07     ` Jay Soffian
2009-03-31 14:19       ` Björn Steinbrink
2009-03-31 14:36         ` Jay Soffian
2009-03-29  1:48 ` [PATCH 1/2] send-email: refactor and ensure prompting doesn't loop forever Jay Soffian
2009-03-30  6:50   ` Junio C Hamano
2009-03-30 11:29 ` Matthieu Moy
2009-03-30 14:17   ` Jay Soffian
2009-03-30 14:18     ` Jay Soffian
2009-03-30 14:40     ` Matthieu Moy
2009-03-30 15:45       ` Jay Soffian
2009-03-30 16:04         ` Jay Soffian [this message]
2009-03-31  9:32           ` Matthieu Moy
2009-03-31 14:12             ` Jay Soffian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76718490903300904k7e8c1054m99edb92d8d582387@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).