From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: me@mutt.org, ossi@users.sf.net, tytso@mit.edu,
Junio C Hamano <gitster@pobox.com>,
mike@codeweavers.com
Subject: [PATCH] git-imap-send bugfix: Allow lines starting with "From " in body
Date: Mon, 22 Mar 2010 00:17:49 +0530 [thread overview]
Message-ID: <f3271551003211147x538d7682wc67dcc4f914ed97c@mail.gmail.com> (raw)
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Documentation/git-imap-send.txt | 5 -----
imap-send.c | 8 +++++++-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index 6cafbe2..ed9d3ce 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -123,11 +123,6 @@ users may wish to visit this web page for more information:
http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
-BUGS
-----
-Doesn't handle lines starting with "From " in the message body.
-
-
Author
------
Derived from isync 1.0.1 by Mike McCormack.
diff --git a/imap-send.c b/imap-send.c
index aeb2985..3163bb9 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1431,8 +1431,14 @@ static int count_messages(struct msg_data *msg)
while (1) {
if (!prefixcmp(p, "From ")) {
+ p = strstr(p+5, "\nFrom: ");
+ if (!p) break;
+ p = strstr(p+7, "\nDate: ");
+ if (!p) break;
+ p = strstr(p+7, "\nSubject: ");
+ if (!p) break;
count++;
- p += 5;
+ p += 10;
}
p = strstr(p+5, "\nFrom ");
if (!p)
--
1.7.0
next reply other threads:[~2010-03-21 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-21 18:47 Ramkumar Ramachandra [this message]
2010-03-21 22:05 ` [PATCH] git-imap-send bugfix: Allow lines starting with "From " in body Junio C Hamano
2010-03-22 2:37 ` Ramkumar Ramachandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3271551003211147x538d7682wc67dcc4f914ed97c@mail.gmail.com \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@mutt.org \
--cc=mike@codeweavers.com \
--cc=ossi@users.sf.net \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).