Subject: RFC: git send-email and error handling

From: Paul Gortmaker <[email-masked]>
Date: Thu, 14 Apr 2011 16:10:12 -0400

I came across a situation today where the behaviour of git send-email
kind of surprised me -- in that it seemed definitely less than ideal
for the use case I had.

For stable linux kernel releases, it is very common to send
hundreds of patches at once, to people you've never contacted before,
simply because the are called out in CC: or SOB: lines of a patch
that has been cherry picked.  So it is highly likely that you may
hit full inboxes, expired accounts and so on.

The command line (git 1.7.4.4) is typically something like:

git send-email --to [email-masked] --to [email-masked] \
   --cc [email-masked]   some_patch_dir

So, let me get to what happened today:  After sending 113 out of 209
patches, it came to the 114th patch, and gave me this:

(mbox) Adding cc: Dmitry Torokhov <[email-masked]> from line 'From: Dmitry Torokhov <[email-masked]>'
(body) Adding cc: Dmitry Torokhov <[email-masked]> from line 'Signed-off-by: Dmitry Torokhov <[email-masked]>'
(body) Adding cc: Paul Gortmaker <[email-masked]> from line 'Signed-off-by: Paul Gortmaker <[email-masked]>'
5.2.1 <[email-masked]>... Mailbox disabled for this recipient

Then, taking that as a hard error, it simply exited,
leaving me scrambling to figure out how to quickly fix the
offending patch and continue with the unsent queue.

 From my point of view, the right thing to do here would have
been to ignore the error on the harvested mail address, and continue
on through the rest of the queue.  Or even interactively ask me what
to do when it saw the 5.2.1 failure.  But maybe that wouldn't be
right for everyone.  I didn't see anything in the GSE man page
that would let me configure this behaviour either.

Anyway, I thought I'd mention it and see where the discussion went.

Thanks,
Paul.