git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] Infinite loop in git send-email if ran non-interactively.

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 25, 2009, 16:03 UTC
Message-ID
<76718490903250903t530983abi8a641e6b7aee6c0@mail.gmail.com>
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.
Show 23 quoted lines
> 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.
Previous: Matthieu MoyNext: Jay Soffian
Message 2 of 5 in “[BUG] Infinite loop in git send-email if ran non-interactively.”
  1. Matthieu MoyMar 25, 2009
  2. Jay SoffianMar 25, 2009
  3. Jay SoffianMar 25, 2009
  4. Jay SoffianMar 25, 2009
  5. Matthieu MoyMar 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.