git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: artagnon@gmail.com, avarab@gmail.com, git@vger.kernel.org,
	mina86@mina86.com, mst@kernel.org, pbonzini@redhat.com,
	viktorin@rehivetech.com, zxq_yx_007@163.com,
	Stefan Beller <sbeller@google.com>
Subject: [PATCH] send-email: have default batch size when relogin delay is given
Date: Wed,  7 Feb 2018 11:45:47 -0800	[thread overview]
Message-ID: <20180207194547.1412-1-sbeller@google.com> (raw)
In-Reply-To: <xmqqlgpppri7.fsf@gitster.mtv.corp.google.com>

When the batch size is neither configured nor given on the command
line, but the relogin delay is given, then the user is not using the
the feature as intended. But as the user gave a relogin delay, there is
clearly the intention to delay sending out emails. Assume a batch size
of 1 instead of silently ignoring the given relogin delay.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 git-send-email.perl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/git-send-email.perl b/git-send-email.perl
index 340b5c8482..5672e05b98 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -379,6 +379,12 @@ unless ($rc) {
 die __("Cannot run git format-patch from outside a repository\n")
 	if $format_patch and not $repo;
 
+if (defined $relogin_delay) {
+	if (not defined $batch_size) {
+		$batch_size = 1;
+	}
+}
+
 # Now, let's fill any that aren't set in with defaults:
 
 sub read_config {
-- 
2.15.1.433.g936d1b9894.dirty


  parent reply	other threads:[~2018-02-07 19:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 12:59 [PATCH v5] send-email: --batch-size to work around some SMTP server limit xiaoqiang zhao
2017-05-22  2:14 ` Junio C Hamano
2017-05-22  3:19   ` Zhaoxiangqiang
2018-02-07 19:45   ` Stefan Beller [this message]
2018-02-07 19:50     ` [PATCH] send-email: have default batch size when relogin delay is given Eric Sunshine
2018-02-07 23:43       ` [PATCH] send-email: error out when relogin delay is missing Stefan Beller
2018-02-08  5:45         ` xiaoqiang zhao
2018-02-08  8:08         ` Eric Sunshine
2018-02-08 18:21           ` Stefan Beller
2018-02-08 22:00             ` Eric Sunshine
2018-02-12 19:44               ` Stefan Beller
2017-05-22  9:26 ` [PATCH v5] send-email: --batch-size to work around some SMTP server limit Ævar Arnfjörð Bjarmason
2017-05-23  7:46   ` Junio C Hamano
2017-05-23  8:30     ` Jan Viktorin
2017-05-23 12:55   ` 赵小强

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180207194547.1412-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=artagnon@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mina86@mina86.com \
    --cc=mst@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=viktorin@rehivetech.com \
    --cc=zxq_yx_007@163.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).