Subject: Re: Apology/Bug report: git-send-email sends everything on Ctrl+C

From: Sam Vilain <[email-masked]>
Date: Wed, 26 May 2010 20:51:58 +1200

Will Palmer wrote:
>> I think I must have actually hit Ctrl-Z, not Ctrl-C.  So, it's all my
>> fault and I apologize profusely.
>>     
> I'd consider anything that can make "accidentally sending 100+ patches"
> possible to be a bug. How does "it was Ctrl-Z, not Ctrl-C" make a
> difference here?

This was what I did;

on git.git next or so; I was thinking "hmm, how does git send-email
format the cover letter for editing by the user?  I know, I'll just check":

 $ git send-email --compose HEAD~5..

(tab around a bit, I think I hit ctrl+z because my history has "jobs" in
it just after that command)

(poke around in the git-send-email source a bit)

(inspect the file it produced, oh look, HEAD~5.. matches an awful lot of
commits)

(close edit window without changes)

(notice hundreds of e-mail headers being spewed out)

Ctrl+C.  nothing (it's in the background)

Ctrl+C again.  argh!  What MTA am I running?

 $ sudo /etc/init.d/postfix stop
 $ sudo /etc/init.d/exim4 stop
 $ cat .git/config

Oh no, it's going to a mail server I don't have root on.  It was fully
configured so it didn't need to ask any questions, just fire away.  Why
did I test that on my git.git checkout?

Quick, find a friendly sysadmin and mailq | grep sam.vilain | cut -d" "
-f1 | sudo xargs -n1 postsuper -d

Hard to know what could have possibly stopped this from happening.  PEBKAC.

Sam