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 <git@vger.kernel.org>
Subject: Re: [BUG] Infinite loop in git send-email if ran non-interactively.
Date: Wed, 25 Mar 2009 12:03:17 -0400	[thread overview]
Message-ID: <76718490903250903t530983abi8a641e6b7aee6c0@mail.gmail.com> (raw)
In-Reply-To: <vpqiqlyj64o.fsf@bauges.imag.fr>

On Wed, Mar 25, 2009 at 5:36 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> I think, non-interactive runs of send-email should assume "yes"

Hmm, probably.

> instead of prompting. In any case, it should not do infinite loop (I
> guess I don't have to argue for this ;-) )

Right, I'll followup with a fix.

> Can someone more fluent in perl than me add a
>
> if(session-is-interactive) {
> ...
> }
>
> around this confirmation prompt?
>
> (side-note : there is indeed some code to handle the cases where the
> terminal doesn't work with readline, added by Junio in 280242d1, but
> the FakeTerm part doesn't seem to be executed in my case:
>
> my $term = eval {
>        $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";
> }
> )
>
> (in the meantime, I'll add --confirm never to my script)

Actually, FakeTerm is only triggered if Term::ReadLine is not
available. The "going non-interactive" message is misleading in this
case, as it has nothing to do with whether stdin is a tty or not.

j.

  reply	other threads:[~2009-03-25 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25  9:36 [BUG] Infinite loop in git send-email if ran non-interactively Matthieu Moy
2009-03-25 16:03 ` Jay Soffian [this message]
2009-03-25 16:23   ` Jay Soffian
2009-03-25 16:04 ` Jay Soffian
2009-03-25 16:23   ` Matthieu Moy

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=76718490903250903t530983abi8a641e6b7aee6c0@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    /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).