From: Jay Soffian <jaysoffian@gmail.com>
To: git@vger.kernel.org
Cc: Bruce Stephens <bruce.stephens@isode.com>,
Dan McGee <dpmcgee@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] send-email: fix nasty bug in ask() function
Date: Sat, 4 Apr 2009 23:31:42 -0400 [thread overview]
Message-ID: <76718490904042031o5009a684xcf10aaff163e657@mail.gmail.com> (raw)
In-Reply-To: <1238901801-47109-1-git-send-email-jaysoffian@gmail.com>
> 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.
prev parent reply other threads:[~2009-04-05 3:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-04 17:02 git send-email prompting too much Dan McGee
2009-04-04 17:12 ` Bruce Stephens
2009-04-05 2:13 ` Jay Soffian
2009-04-05 2:49 ` Jay Soffian
2009-04-05 9:45 ` Junio C Hamano
2009-04-05 3:23 ` [PATCH] send-email: fix nasty bug in ask() function Jay Soffian
2009-04-05 3:31 ` Jay Soffian [this message]
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=76718490904042031o5009a684xcf10aaff163e657@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=bruce.stephens@isode.com \
--cc=dpmcgee@gmail.com \
--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).