summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNathan Payre <nathan.payre@etu.univ-lyon1.fr>2017-12-15 16:33:39 +0100
committerJunio C Hamano <gitster@pobox.com>2017-12-15 10:46:53 -0800
commitb6049542b97e7b135e0e82bf996084d461224d32 (patch)
treefc61bdbd9ff4e8dfd2188b98aab4b0ae50e8bf29 /builtin
parent52015aaf9d19c97b52c47c7046058e6d029ff856 (diff)
downloadgit-np/send-email-header-parsing.tar.gz
send-email: extract email-parsing code into a subroutinenp/send-email-header-parsing
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 'builtin')
0 files changed, 0 insertions, 0 deletions