From: Georgi Chorbadzhiyski <gf@unixsol.org>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] send-mail: Add option to sleep between sending each email.
Date: Thu, 08 Sep 2011 17:07:04 +0300 [thread overview]
Message-ID: <4E68CC08.4040201@unixsol.org> (raw)
In-Reply-To: <4E68CA0C.5080702@unixsol.org>
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
Around 09/08/2011 04:58 PM, Georgi Chorbadzhiyski scribbled:
> Around 09/08/2011 02:15 PM, Matthieu Moy scribbled:
>> [1] Actually, I think there's a problem with Georgi's patch. If I read
>> correctly, the sleep is inserted within the confirmation loop, which
>> means the user will have
>>
>> send this email? yes
>> sending email
>> sleeping 10 seconds
>> send this email? yes
>> sending email
>> sleeping 10 seconds
>> ...
>>
>> while it should be
>>
>> send this email? yes
>> ok, I'll send it later
>> send this email? yes
>> ok, I'll send it later
>> sending first email ...
>> sleeping 10 seconds
>> sending second email
>> done.
>>
>> (i.e. don't force the user to wait between confirmations, and don't wait
>> after the last email)
>
> In order for this to work, confirmation should be split from send_message()
> and from a quick look this not seem very easy. Might be easier to just
> disable the sleep if user was asked for confirmation. It'll be good to
> not sleep after last email, but main "foreach my $t (@files) {" loop should
> pass some hint to send_message().
The attached patch (apply on on top of the original) should implement the
idea.
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
[-- Attachment #2: send-email-sleep-fix1.diff --]
[-- Type: text/plain, Size: 399 bytes --]
diff --git a/git-send-email.perl b/git-send-email.perl
index 7239fd4..d4559c9 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1149,7 +1149,7 @@ X-Mailer: git-send-email $gitversion
}
}
- if (!$dry_run && $sleep) {
+ if (!$dry_run && $sleep && $message_num < scalar $#files && $confirm eq 'never') {
print "Sleeping: $sleep second(s).\n" if (!$quiet);
sleep($sleep);
};
next prev parent reply other threads:[~2011-09-08 14:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 20:43 [PATCH] send-mail: Add option to sleep between sending each email Georgi Chorbadzhiyski
2011-09-08 8:43 ` Ramkumar Ramachandra
2011-09-08 9:03 ` Matthieu Moy
2011-09-08 9:28 ` Ramkumar Ramachandra
2011-09-08 9:35 ` Ramkumar Ramachandra
2011-09-08 10:44 ` Ramkumar Ramachandra
2011-09-08 10:57 ` Georgi Chorbadzhiyski
2011-09-08 11:15 ` Matthieu Moy
2011-09-08 13:58 ` Georgi Chorbadzhiyski
2011-09-08 14:07 ` Georgi Chorbadzhiyski [this message]
2011-10-03 20:17 ` Jakub Narebski
2011-09-08 17:14 ` Georgi Chorbadzhiyski
2011-09-08 17:12 ` Junio C Hamano
2011-09-08 20:50 ` Matthieu Moy
2011-09-09 2:12 ` mfwitten
2011-09-12 5:34 ` Ramkumar Ramachandra
2011-09-08 9:11 ` Georgi Chorbadzhiyski
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=4E68CC08.4040201@unixsol.org \
--to=gf@unixsol.org \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=artagnon@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.