git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] restrict the patch filtering

From
DZDon Zickus <dzickus@redhat.com>
Date
Mar 6, 2007, 21:57 UTC
Message-ID
<117321826466-git-send-email-dzickus@redhat.com>
In-Reply-To
<11732182643385-git-send-email-dzickus@redhat.com>

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 <dzickus@redhat.com>
---
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
Previous: Don ZickusNext: Don Zickus
Message 3 of 8 in “builtin-mailinfo.c infrastrcture changes”
  1. 1/5 builtin-mailinfo.c infrastrcture changesDon Zickus, Mar 6, 2007
  2. 2/5 add the ability to select more email header fields to outputDon Zickus, Mar 6, 2007
  3. 3/5 restrict the patch filteringDon Zickus, Mar 6, 2007
  4. 4/5 Add a couple more test cases to the suite.Don Zickus, Mar 6, 2007
  5. 5/5 fix a utf8 issue in t5100/patch005Don Zickus, Mar 6, 2007
  6. Linus TorvaldsMar 6, 2007
  7. Junio C HamanoMar 7, 2007
  8. Don ZickusMar 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.