From: Michael Witten <mfwitten@gmail.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH RFC 08/10] send-email: Add --sleep for email throttling
Date: Sat, 11 Apr 2009 21:59:57 -0500 [thread overview]
Message-ID: <f661ba4e-cfb0-4756-8ef4-4a4f9f66c4e8mfwitten@gmail.com> (raw)
In-Reply-To: 1239476908-25944-8-git-send-email-mfwitten@gmail.com
On Sat, Apr 11, 2009 at 21:27, Jay Soffian <jaysoffian@gmail.com> wrote:
> On Sat, Apr 11, 2009 at 3:08 PM, Michael Witten <mfwitten@gmail.com> wrote:
>> +if (defined $sleep) {{
>> +}}
>
> What's the double-brackets about?
The {} that form the true-body of the if statement don't actually
denote a block. The extra layer of {} is explicitly creating a block.
This is done, because in Perl, blocks can be thought of as loops that
execute one iteration, so you can use all of the loop flow-control
operators 'redo', 'last', and 'next'.
In this case, I wanted to use 'last' to jump out of --sleep setup
should the user decide to do so, because I think it's cleaner than a
goto or variable check or superfluous loop:
if (defined $sleep) {{
unless ($chain_reply_to) {
...
/^b/ or
/^s/ and $chain_reply_to = 1 or
/^c/ and $sleep = undef, last or # forget --sleep was ever used
/^n/ and $chain_reply_to = 1, $sleep = undef, last or # forget --sleep was ever used
/^q/ and exit;
}
...
}}
# last jumps to here
Anyway, this particular behavior was requested (and seems reasonable):
http://marc.info/?l=git&m=123929919621279&w=2
Sincerely,
Michael Witten
next prev parent reply other threads:[~2009-04-12 3:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 19:08 [PATCH RFC 01/10] Docs: send-email: Put options back into alphabetical order Michael Witten
2009-04-11 19:08 ` [PATCH RFC 02/10] Docs: send-email: Remove superfluous information in CONFIGURATION Michael Witten
2009-04-11 19:08 ` [PATCH RFC 03/10] send-email: Cleanup the usage text and docs a bit Michael Witten
2009-04-11 19:08 ` [PATCH RFC 04/10] send-email: --smtp-server-port should take an integer Michael Witten
2009-04-11 19:08 ` [PATCH RFC 05/10] send-email: Handle "GIT:" rather than "GIT: " during --compose Michael Witten
2009-04-11 19:08 ` [PATCH RFC 06/10] send-email: References: should only reference what is actually sent Michael Witten
2009-04-11 19:08 ` [PATCH RFC 07/10] send-email: Remove horrible mix of tabs and spaces Michael Witten
2009-04-11 19:08 ` [PATCH RFC 08/10] send-email: Add --sleep for email throttling Michael Witten
2009-04-11 19:08 ` [PATCH RFC 09/10] send-email: Minor cleanup of $smtp_server usage and send_message() Michael Witten
2009-04-11 19:08 ` [PATCH RFC 10/10] send-email: --compose takes optional argument to existing file Michael Witten
2009-04-11 19:25 ` Sverre Rabbelier
2009-04-11 19:38 ` Michael Witten
2009-04-11 21:58 ` [PATCH RFC 09/10] send-email: Minor cleanup of $smtp_server usage and send_message() Stephen Boyd
2009-04-11 22:13 ` Michael Witten
2009-04-12 2:27 ` [PATCH RFC 08/10] send-email: Add --sleep for email throttling Jay Soffian
2009-04-12 2:59 ` Michael Witten [this message]
2009-04-11 19:17 ` [PATCH RFC 07/10] send-email: Remove horrible mix of tabs and spaces Sverre Rabbelier
2009-04-11 19:31 ` Michael Witten
2009-04-13 1:49 ` Miles Bader
2009-04-13 2:15 ` Michael Witten
2009-04-11 21:52 ` [PATCH RFC 06/10] send-email: References: should only reference what is actually sent Stephen Boyd
2009-04-11 22:42 ` Michael Witten
2009-04-11 21:42 ` [PATCH RFC 02/10] Docs: send-email: Remove superfluous information in CONFIGURATION Stephen Boyd
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=f661ba4e-cfb0-4756-8ef4-4a4f9f66c4e8mfwitten@gmail.com \
--to=mfwitten@gmail.com \
--cc=git@vger.kernel.org \
--cc=jaysoffian@gmail.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).