diff options
author | Nathan Payre <nathan.payre@etu.univ-lyon1.fr> | 2017-12-15 18:33:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-15 21:46:53 +0300 |
commit | b6049542b97e7b135e0e82bf996084d461224d32 (patch) | |
tree | fc61bdbd9ff4e8dfd2188b98aab4b0ae50e8bf29 /merge.c | |
parent | 52015aaf9d19c97b52c47c7046058e6d029ff856 (diff) |
send-email: extract email-parsing code into a subroutine
The existing code mixes parsing of email header with regular
expression and actual code. Extract the parsing code into a new
subroutine "parse_header_line()". This improves the code readability
and make parse_header_line reusable in other place.
"parsed_header_line()" and "filter_body()" could be used for
refactoring the part of code which parses the header to prepare the
email and send it.
In contrast to the previous version it doesn't keep the header order
and strip duplicate headers.
Signed-off-by: Nathan Payre <nathan.payre@etu.univ-lyon1.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@univ-lyon1.fr>
Signed-off-by: Timothee Albertin <timothee.albertin@etu.univ-lyon1.fr>
Signed-off-by: Daniel Bensoussan <daniel.bensoussan--bohm@etu.univ-lyon1.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Matthieu Moy <matthieu.moy@univ-lyon1.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge.c')
0 files changed, 0 insertions, 0 deletions