diff options
author | Matthieu Moy <git@matthieu-moy.fr> | 2017-08-23 12:21:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-24 14:40:15 -0700 |
commit | cb2922fe4b2a82e2174d419781836e768651ebff (patch) | |
tree | 4d0d7af22e2d52a1acbecfd43017f0cc77a17923 /dir-iterator.c | |
parent | Prepare for 2.14.2 (diff) | |
download | tgif-cb2922fe4b2a82e2174d419781836e768651ebff.tar.xz |
send-email: fix garbage removal after address
This is a followup over 9d33439 (send-email: only allow one address
per body tag, 2017-02-20). The first iteration did allow writting
Cc: <foo@example.com> # garbage
but did so by matching the regex ([^>]*>?), i.e. stop after the first
instance of '>'. However, it did not properly deal with
Cc: foo@example.com # garbage
Fix this using a new function strip_garbage_one_address, which does
essentially what the old ([^>]*>?) was doing, but dealing with more
corner-cases. Since we've allowed
Cc: "Foo # Bar" <foobar@example.com>
in previous versions, it makes sense to continue allowing it (but we
still remove any garbage after it). OTOH, when an address is given
without quoting, we just take the first word and ignore everything
after.
Signed-off-by: Matthieu Moy <git@matthieu-moy.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir-iterator.c')
0 files changed, 0 insertions, 0 deletions