From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Nonempty second line in commit message (??) Date: Sun, 29 Mar 2015 13:10:59 -0700 Organization: UCLA Computer Science Department Message-ID: <55185C53.7010308@cs.ucla.edu> References: <55173A2E.7000309@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080303050905040007080904" X-Trace: ger.gmane.org 1427659888 8049 80.91.229.3 (29 Mar 2015 20:11:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Mar 2015 20:11:28 +0000 (UTC) Cc: Emacs-Devel devel To: "Jan D." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 29 22:11:17 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YcJY8-0005IT-N0 for ged-emacs-devel@m.gmane.org; Sun, 29 Mar 2015 22:11:13 +0200 Original-Received: from localhost ([::1]:58076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcJY7-0003LE-SF for ged-emacs-devel@m.gmane.org; Sun, 29 Mar 2015 16:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcJY3-0003JN-Pr for emacs-devel@gnu.org; Sun, 29 Mar 2015 16:11:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcJY0-0002F3-J8 for emacs-devel@gnu.org; Sun, 29 Mar 2015 16:11:07 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:59382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcJY0-0002El-BK for emacs-devel@gnu.org; Sun, 29 Mar 2015 16:11:04 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 96E0939E801A; Sun, 29 Mar 2015 13:11:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bJYFIQ7l9Uu4; Sun, 29 Mar 2015 13:10:59 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id CDBBE39E8013; Sun, 29 Mar 2015 13:10:59 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184524 Archived-At: This is a multi-part message in MIME format. --------------080303050905040007080904 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Jan D. wrote: > That would be more helpful. OK, thanks, I did that in master, as part of the attached patch. --------------080303050905040007080904 Content-Type: text/x-patch; name="0001-Fix-commit-msg-to-cite-CONTRIBUTE.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-commit-msg-to-cite-CONTRIBUTE.patch" >From 19f8e0231d1754658e712e21af32f2f4e04bdfdf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 29 Mar 2015 13:03:55 -0700 Subject: [PATCH] Fix 'commit-msg' to cite 'CONTRIBUTE' As suggested in: http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00947.html Also, have the two files match better. * CONTRIBUTE: Match what's in build-aux/git-hooks/commit-msg. * build-aux/git-hooks/commit-msg: Mention 'CONTRIBUTE'. --- CONTRIBUTE | 16 +++++++++++----- ChangeLog | 9 +++++++++ build-aux/git-hooks/commit-msg | 16 ++++++++-------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTE b/CONTRIBUTE index 7c40227..c723143 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -37,16 +37,17 @@ specify the actual author; the committer defaults to you. When using git, commit messages should use ChangeLog format, with the following modifications: -- Add a single short line explaining the change, then an empty line, - then unindented ChangeLog entries. +- Start with a single unindented summary line explaining the change, + then an empty line, then unindented ChangeLog entries. You can use various Emacs functions to ease this process; see (info "(emacs)Change Log Commands") or http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. -- The summary line is limited to 72 characters (enforced by a commit - hook). If you have trouble making that a good summary, add a - paragraph below it, before the individual file descriptions. +- Limit lines in commit messages to 78 characters, unless they consist + of a single word of at most 140 characters. If you have trouble + fitting the summary into 78 characters, add a summarizing paragraph + below the empty line and before the individual file descriptions. - If only a single file is changed, the summary line can be the normal file first line (starting with the asterisk). Then there is no @@ -57,6 +58,11 @@ following modifications: the rationale for a change; that can be done in the commit message between the summary line and the file entries. +- Commit messages should contain only printable UTF-8 characters. + +- Commit messages should not contained the "Signed-off-by:" lines that + are used in some other projects. + ** ChangeLog notes - Emacs generally follows the GNU coding standards when it comes to diff --git a/ChangeLog b/ChangeLog index a489ab9..f550c6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-03-29 Paul Eggert + + Fix 'commit-msg' to cite 'CONTRIBUTE' + As suggested in: + http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00947.html + Also, have the two files match better. + * CONTRIBUTE: Match what's in build-aux/git-hooks/commit-msg. + * build-aux/git-hooks/commit-msg: Mention 'CONTRIBUTE'. + 2015-03-23 Andreas Schwab * configure.ac: Fix jpeg version check to work with gcc >= 5. diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 31df5ce..13a0535 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -63,7 +63,7 @@ exec $awk ' /^#/ { next } !/^.*$/ { - print "Invalid character (not UTF-8) in commit message" + print "Invalid character (not UTF-8) in commit message; see 'CONTRIBUTE'" status = 1 } @@ -77,13 +77,13 @@ exec $awk ' sub(/^squash! /, "") if ($0 ~ "^" space) { - print "White space at start of commit message'\''s first line" + print "White space at start of commit message'\''s first line; see 'CONTRIBUTE'" status = 1 } } nlines == 2 && $0 ~ non_space { - print "Nonempty second line in commit message" + print "Nonempty second line in commit message; see 'CONTRIBUTE'" status = 1 } @@ -97,28 +97,28 @@ exec $awk ' } 78 < length && $0 ~ space { - print "Line longer than 78 characters in commit message" + print "Line longer than 78 characters in commit message; see 'CONTRIBUTE'" status = 1 } 140 < length { - print "Word longer than 140 characters in commit message" + print "Word longer than 140 characters in commit message; see 'CONTRIBUTE'" status = 1 } /^Signed-off-by: / { - print "'\''Signed-off-by:'\'' in commit message" + print "'\''Signed-off-by:'\'' in commit message; see 'CONTRIBUTE'" status = 1 } $0 ~ non_print { - print "Unprintable character in commit message" + print "Unprintable character in commit message; see 'CONTRIBUTE'" status = 1 } END { if (nlines == 0) { - print "Empty commit message" + print "Empty commit message; see 'CONTRIBUTE'" status = 1 } exit status -- 2.1.0 --------------080303050905040007080904--