Subject: [PATCH 3/5] restrict the patch filtering

From: Don Zickus <[email-masked]>
Date: Tue, 6 Mar 2007 16:57:41 -0500

I have come across many emails that use long strings of '-'s as separators
for ideas.  This patch below limits the separator to only 3 '-', with the
intent that long string of '-'s will stay in the commit msg and not in the
patch file.

Signed-off-by: Don Zickus <[email-masked]>

---
I purposedly separated this patch out because I wasn't sure if anyone would
have objections to it.  I tested it on numerous emails with and with patches
and didn't see any issues.
---
 builtin-mailinfo.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 0532003..0d7c77b 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -666,7 +666,8 @@ static int handle_commit_msg(char *line)
 	}
 
 	if (!memcmp("diff -", line, 6) ||
-	    !memcmp("---", line, 3) ||
+	    !memcmp("---\n", line, 4) ||
+	    !memcmp("--- ", line, 4) ||
 	    !memcmp("Index: ", line, 7)) {
 		fclose(cmitmsg);
 		cmitmsg = NULL;
-- 
1.5.0.2.212.gd52f-dirty