[PATCH 3/5] restrict the patch filtering
- From
- Don 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