Skip to content

Commit

Permalink
Merge branch 'rr/imap-send-unconfuse-from-line' into maint
Browse files Browse the repository at this point in the history
* rr/imap-send-unconfuse-from-line:
  imap-send: Remove limitation on message body
  • Loading branch information
Junio C Hamano committed Apr 10, 2010
2 parents 581b26c + 4916c8f commit 2e5a40f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 3 additions & 7 deletions Documentation/git-imap-send.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ DESCRIPTION
This command uploads a mailbox generated with 'git format-patch'
into an IMAP drafts folder. This allows patches to be sent as
other email is when using mail clients that cannot read mailbox
files directly.
files directly. The command also works with any general mailbox
in which emails have the fields "From", "Date", and "Subject" in
that order.

Typical usage is something like:

Expand Down Expand Up @@ -118,12 +120,6 @@ Thunderbird in particular is known to be problematic. Thunderbird
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.
Expand Down
8 changes: 7 additions & 1 deletion imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,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;
p += 10;
count++;
p += 5;
}
p = strstr(p+5, "\nFrom ");
if (!p)
Expand Down

0 comments on commit 2e5a40f

Please sign in to comment.