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

Re: [PATCH] send-email: fix nasty bug in ask() function

From
Jay Soffian <jaysoffian@gmail.com>
Date
Apr 5, 2009, 03:31 UTC
Message-ID
<76718490904042031o5009a684xcf10aaff163e657@mail.gmail.com>
In-Reply-To
<1238901801-47109-1-git-send-email-jaysoffian@gmail.com>
Show 13 quoted lines
> I'm also super confused why the issue is occuring. You can see from the
> patch below that by default the ask() function attempted to match the
> user's input against the empty regex //, which should match anything:
>
> $ perl -e 'use strict; my $resp="something"; my $re=""; print "true\n" if $resp =~ /$re/'
> true
> $ perl -e 'use strict; my $resp=""; my $re=""; print "true\n" if $resp =~ /$re/'
> true
>
> Any yet while my demonstration above works as I expect, for some reason
> what is basically the same code (AFAICT) in send-email does not match. I
> thought I knew my perl fairly well, but maybe some perl guru can see
> what's going wrong.
Ah, found it in perlreref:
   If 'pattern' is an empty string, the last successfully matched
   regex is used.
Grumble.
j.
Previous: Jay Soffian
Message 7 of 7 in “git send-email prompting too much”
  1. Dan McGeeApr 4, 2009
  2. Bruce StephensApr 4, 2009
  3. Jay SoffianApr 5, 2009
  4. Jay SoffianApr 5, 2009
  5. Junio C HamanoApr 5, 2009
  6. send-email: fix nasty bug in ask() functionJay Soffian, Apr 5, 2009
  7. Jay SoffianApr 5, 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.