Junio C Hamano  committed 2e5a40f Merge

Merge branch 'rr/imap-send-unconfuse-from-line' into maint

* rr/imap-send-unconfuse-from-line:
imap-send: Remove limitation on message body

  • Participants
  • Parent commits 581b26c, 4916c8f

Comments (0)

Files changed (2)

File Documentation/git-imap-send.txt

 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:
 users may wish to visit this web page for more information:
-Doesn't handle lines starting with "From " in the message body.
 Derived from isync 1.0.1 by Mike McCormack.
 	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;
-			p += 5;
 		p = strstr(p+5, "\nFrom ");
 		if (!p)