Re: [PATCH] send-email: have default batch size when relogin delay is given
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 7, 2018, 19:50 UTC
- Message-ID
- <CAPig+cQZr=UN3KC3LnaKy=oUYd1inbtDgi_pDuhPXf9HgFOdNw@mail.gmail.com>
- In-Reply-To
- <20180207194547.1412-1-sbeller@google.com>
On Wed, Feb 7, 2018 at 2:45 PM, Stefan Beller <sbeller@google.com> wrote:
Show 15 quoted lines
> 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>
> ---
> diff --git a/git-send-email.perl b/git-send-email.perl
> @@ -379,6 +379,12 @@ unless ($rc) {
> +if (defined $relogin_delay) {
> + if (not defined $batch_size) {
> + $batch_size = 1;
> + }
> +}Maybe also print a message that this batch size has been used as default lest the user wonder why it's sending "slowly" without apparently batching anything.
Alternately, complain and die if both options are not specified.