From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Sebrecht Subject: Re: [PATCH] Re: Teach mailinfo to ignore everything before -- >8 -- mark Date: Tue, 25 Aug 2009 18:18:30 +0200 Message-ID: References: <7v3a7g501e.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Nicolas Sebrecht , Nanako Shiraishi , Thell Fowler , git@vger.kernel.org, Johannes.Schindelin@gmx.de To: Junio C Hamano X-From: git-owner@vger.kernel.org Tue Aug 25 18:20:01 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1MfykU-0005h1-9y for gcvg-git-2@lo.gmane.org; Tue, 25 Aug 2009 18:19:55 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754952AbZHYQTn (ORCPT ); Tue, 25 Aug 2009 12:19:43 -0400 X-Warning: Original message contained 8-bit characters, however during the SMTP transport session the receiving system did not announce capability of receiving 8-bit SMTP (RFC 1651-1653), and as this message does not have MIME headers (RFC 2045-2049) to enable encoding change, we had very little choice. X-Warning: We ASSUME it is less harmful to add the MIME headers, and convert the text to Quoted-Printable, than not to do so, and to strip the message to 7-bits.. (RFC 1428 Appendix A) X-Warning: We don't know what character set the user used, thus we had to write these MIME-headers with our local system default value. Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754900AbZHYQTm (ORCPT ); Tue, 25 Aug 2009 12:19:42 -0400 Received: from mail-ew0-f206.google.com ([209.85.219.206]:60091 "EHLO mail-ew0-f206.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754836AbZHYQTl (ORCPT ); Tue, 25 Aug 2009 12:19:41 -0400 Received: by ewy2 with SMTP id 2so593042ewy.17 for ; Tue, 25 Aug 2009 09:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=LaMF2Q44AWAJW4QNXZYZUv/wob2DveBuuTj9yYZY66k=; b=SnNiLm+g9W4+oq30k/762ohk8R1JHA8KeQHMy46NfZZCpvsamdgH2Bl+AfrWrAfadR DsQgbcWvrDgPyWIsNKjeAOQjT33qBz60HnmSqwpdY+XuOgqEg6dwuzRsy4uR3xWdwRMx oyr490IrpgizbLJjkrVU+IJOYMrjDta9lQBLE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=ZvBdjka3tW+PPQUr5QSCje8LJr/yYE3/OiXSlnpTMUsOHw1eWoI2xL0+y5VKeZq60i QuJEZEgMhR2QX5T5HqsZYAhJFexg4o5uBF03JMKwwH3gLMbQpLQxK1SwGY/pnai+Q4Qe qotLz5f9vwLpcmWLAAxu5R9PPpPLWXwhG90xc= Received: by 10.210.138.19 with SMTP id l19mr3111766ebd.45.1251217181929; Tue, 25 Aug 2009 09:19:41 -0700 (PDT) Received: from localhost (88-121-119-167.rev.libertysurf.net [88.121.119.167]) by mx.google.com with ESMTPS id 7sm647948eyb.12.2009.08.25.09.19.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Aug 2009 09:19:36 -0700 (PDT) X-Mailer: git-send-email 1.6.4.1.334.gf42e22 In-Reply-To: <7v3a7g501e.fsf@alter.siamese.dyndns.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: The 24/08/09, Junio C Hamano wrote: > pe= rhaps = =20 > 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 loo= ks > 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 =E2=80=95 and "ea= sy" to=20 explain to the end-user =E2=80=95 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. =46or 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=3D