send-email: Don't leak To: headers between patches
commit3c3bb51c3b205a6838b022896c9323d4b25bf392
authorStephen Boyd <bebarino@gmail.com>
Mon, 4 Oct 2010 07:05:24 +0000 (4 00:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Oct 2010 07:12:13 +0000 (4 00:12 -0700)
tree03eb8b996e1d3f851843139d20c33c7921adfa9b
parent21802cd32805b19fa32e8e3594ee3914733d53d3
send-email: Don't leak To: headers between patches

If the first patch in a series has a To: header in the file and the
second patch in the series doesn't the address from the first patch will
be part of the To: addresses in the second patch. Fix this by treating the
to list like the cc list. Have an initial to list come from the command
line, user input and config options. Then build up a to list from each
patch and concatenate the two together before sending the patch. Finally,
reset the list after sending each patch so the To: headers from a patch
don't get used for the next one.

Reported-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
t/t9001-send-email.sh