git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add function strbuf_addstr_xml_quoted() and more
@ 2012-11-25 11:08 Michael Haggerty
  2012-11-25 11:08 ` [PATCH 1/8] Add new function strbuf_add_xml_quoted() Michael Haggerty
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Michael Haggerty @ 2012-11-25 11:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jeremy White, Johannes Schindelin, Michael Haggerty

There were two functions doing almost the same XML quoting of
character entities, so implement a library function
strbuf_addstr_xml_quoted() and use that in both places.

Along the way, do a lot of simplification within imap-send.c, which
was doing a lot of its own string management instead of using strbuf.

Please note that "git imap-send" is utterly absent from the test
suite, probably due to the difficulty of testing without a real IMAP
server.  I ran some manual tests after my changes and didn't find any
problems.

The bug that I reported on 2012-11-12, namely that

    git format-patch --signoff --stdout --attach origin | git imap-send

is broken, is not addressed by these patches.

Michael Haggerty (8):
  Add new function strbuf_add_xml_quoted()
  xml_entities(): use function strbuf_addstr_xml_quoted()
  lf_to_crlf(): NUL-terminate msg_data::data
  imap-send: store all_msgs as a strbuf
  imap-send: correctly report errors reading from stdin
  imap-send: change msg_data from storing (char *, len) to storing
    strbuf
  wrap_in_html(): use strbuf_addstr_xml_quoted()
  wrap_in_html(): process message in bulk rather than line-by-line

 http-push.c |  23 +--------
 imap-send.c | 157 +++++++++++++++++++++++++++---------------------------------
 strbuf.c    |  26 ++++++++++
 strbuf.h    |   6 +++
 4 files changed, 104 insertions(+), 108 deletions(-)

-- 
1.8.0

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-12-03 15:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-25 11:08 [PATCH 0/8] Add function strbuf_addstr_xml_quoted() and more Michael Haggerty
2012-11-25 11:08 ` [PATCH 1/8] Add new function strbuf_add_xml_quoted() Michael Haggerty
2012-11-25 11:08 ` [PATCH 2/8] xml_entities(): use function strbuf_addstr_xml_quoted() Michael Haggerty
2012-11-25 11:08 ` [PATCH 3/8] lf_to_crlf(): NUL-terminate msg_data::data Michael Haggerty
2012-11-25 11:08 ` [PATCH 4/8] imap-send: store all_msgs as a strbuf Michael Haggerty
2012-11-25 11:08 ` [PATCH 5/8] imap-send: correctly report errors reading from stdin Michael Haggerty
2012-11-25 11:08 ` [PATCH 6/8] imap-send: change msg_data from storing (char *, len) to storing strbuf Michael Haggerty
2012-11-29 21:30   ` Junio C Hamano
2012-11-29 23:43     ` Jeff King
2012-11-30 13:36     ` Michael Haggerty
2012-12-02  1:48       ` Junio C Hamano
2012-12-02  6:03         ` Michael Haggerty
2012-12-03 15:06         ` Thiago Farina
2012-11-25 11:08 ` [PATCH 7/8] wrap_in_html(): use strbuf_addstr_xml_quoted() Michael Haggerty
2012-11-29 21:41 ` [PATCH 0/8] Add function strbuf_addstr_xml_quoted() and more Junio C Hamano
     [not found] ` <1353841721-16269-9-git-send-email-mhagger@alum.mit.edu>
     [not found]   ` <7v7gp4p00u.fsf@alter.siamese.dyndns.org>
2012-11-30 13:40     ` [PATCH 8/8] wrap_in_html(): process message in bulk rather than line-by-line Michael Haggerty
2012-12-02  9:25       ` Junio C Hamano
2012-12-02 10:35         ` Michael Haggerty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).