From: Nicolas Sebrecht Date: Tue, 25 Aug 2009 16:18:30 GMT Subject: Re: [PATCH] Re: Teach mailinfo to ignore everything before -- >8 -- mark Message-ID: In-Reply-To: <7v3a7g501e.fsf@alter.siamese.dyndns.org> The 24/08/09, Junio C Hamano wrote: > perhaps > we should tighten the rules a bit, <...> > I think we have bikeshedded long enough, so I won't be touching this code > any further only to change the definition of what a scissors mark looks > like, I'm not sure I understand. Are you still open to a patch touching this code /too/? Anyway, here's what I wrote based on your last round in pu. I've change the rules to something because I think we'd rather simple ― and "easy" to explain to the end-user ― rules over "obfuscated" ones. -- >8 -- squashable to 8683eeb (ogirin/pu) -- >8 -- Subject: Teach mailinfo to ignore everything before a scissors line This teaches mailinfo the scissors mark (e.g. "-- >8 --"); the command ignores everything before it in the message body. For lefties among us, we also support -- 8< -- ;-) We can skip this check using the "--ignore-scissors" option on both the git-mailinfo and the git-am command line. This is necessary because the stripped message may be either interesting from the eyes of the maintainer, regardless what the author think; or the scissors line check is a false positive. Basically, the rules are: (1) a scissors mark: - must be 8 characters long; - must have a dash; - must have either ">8" or "<8"; - may contain spaces. (2) a scissors line: - must have only one scissors mark; or - must have any comment between two identical scissors marks; - always ignore spaces outside the scissors marks. Signed-off-by: Nicolas Sebrecht --- Documentation/git-am.txt | 14 +++++- Documentation/git-mailinfo.txt | 7 ++- builtin-mailinfo.c | 103 +++++++++++++++++++++++---------------- git-am.sh | 14 ++++- 4 files changed, 90 insertions(+), 48 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index fcacc94..2773a3e 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -13,7 +13,7 @@ SYNOPSIS [--3way] [--interactive] [--committer-date-is-author-date] [--ignore-date] [--ignore-space-change | --ignore-whitespace] [--whitespace=