git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: git@vger.kernel.org
Cc: Don Zickus <dzickus@redhat.com>
Subject: [PATCH 3/5] restrict the patch filtering
Date: Tue,  6 Mar 2007 16:57:41 -0500	[thread overview]
Message-ID: <117321826466-git-send-email-dzickus@redhat.com> (raw)
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

  reply	other threads:[~2007-03-06 21:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 21:57 [PATCH 1/5] builtin-mailinfo.c infrastrcture changes Don Zickus
2007-03-06 21:57 ` [PATCH 2/5] add the ability to select more email header fields to output Don Zickus
2007-03-06 21:57   ` Don Zickus [this message]
2007-03-06 21:57     ` [PATCH 4/5] Add a couple more test cases to the suite Don Zickus
2007-03-06 21:57       ` [PATCH 5/5] fix a utf8 issue in t5100/patch005 Don Zickus
2007-03-06 22:19     ` [PATCH 3/5] restrict the patch filtering Linus Torvalds
2007-03-07  5:34 ` [PATCH 1/5] builtin-mailinfo.c infrastrcture changes Junio C Hamano
2007-03-07 17:17   ` Don Zickus
  -- strict thread matches above, loose matches on Subject: below --
2007-03-12 19:52 [PATCH 0/5] git-mailinfo fixes/features Don Zickus
2007-03-12 19:52 ` [PATCH 3/5] restrict the patch filtering Don Zickus
2007-03-14 20:12 git-mailinfo fixes/features v3 Don Zickus
2007-03-14 20:12 ` [PATCH 3/5] restrict the patch filtering Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=117321826466-git-send-email-dzickus@redhat.com \
    --to=dzickus@redhat.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).