Patch #33118

Detect plain diffs in e-mail submitted issues and map to attachments

Added by Anthony Mallet almost 3 years ago. Updated over 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Email receiving
Target version:-


Diffs sent as plain/text message (as with git format-patch + git send-email) in
issues tend to be textilized, which messes up the display. Also, the original
patch file is not easily downloadable for processing.

With this patch, when a diff file is detected in a plain text message without
attachment, the whole e-mail message is converted into a proper attachment
(that is suitable for git am) and only the diff comment is stored in the
issue description.

The diff detection is based on the following heuristics:
- body contains three consecutive lines starting with "---", "+++" and "@@"
- and body contains a line starting with "---", "diff -" or "Index: "

The message body is split before this detected separator.

0001-Detect-diff-files-in-e-mailed-issues-and-map-patch-t.patch Magnifier (2.33 KB) Anthony Mallet, 2020-03-10 11:20


#1 Updated by Go MAEDA over 2 years ago

  • Category set to Email receiving

Also available in: Atom PDF