From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Checking in files with trailing white space Date: Tue, 13 Dec 2016 18:28:22 +0000 Message-ID: <20161213182822.GA2705@acm.fritz.box> References: <20161211133110.GB14084@acm.fritz.box> <20161212221642.GA4361@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1481653737 3541 195.159.176.226 (13 Dec 2016 18:28:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 18:28:57 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: Lars Ingebrigtsen , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 13 19:28:53 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGrop-0000JZ-RS for ged-emacs-devel@m.gmane.org; Tue, 13 Dec 2016 19:28:51 +0100 Original-Received: from localhost ([::1]:40028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGrou-0007mw-5F for ged-emacs-devel@m.gmane.org; Tue, 13 Dec 2016 13:28:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGroo-0007mo-4Q for emacs-devel@gnu.org; Tue, 13 Dec 2016 13:28:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGroj-0008VX-8Y for emacs-devel@gnu.org; Tue, 13 Dec 2016 13:28:50 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:51251 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1cGroi-0008Uy-V7 for emacs-devel@gnu.org; Tue, 13 Dec 2016 13:28:45 -0500 Original-Received: (qmail 54565 invoked by uid 3782); 13 Dec 2016 18:28:43 -0000 Original-Received: from acm.muc.de (p548C766B.dip0.t-ipconnect.de [84.140.118.107]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 13 Dec 2016 19:28:42 +0100 Original-Received: (qmail 2724 invoked by uid 1000); 13 Dec 2016 18:28:22 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:210411 Archived-At: Hello, Paul. On Mon, Dec 12, 2016 at 02:57:42PM -0800, Paul Eggert wrote: > On 12/12/2016 02:16 PM, Alan Mackenzie wrote: > > However, this absolute prohibition on trailing spaces is fascistic. > > Some files (for example, test files) have essential trailing spaces in > > them > I added a comment to the pre-commit file to help out others in your > situation; see the attached patch. Thanks. That looks just the job! > As it is all too easy to overlook trailing white space when reading > source code, I'd rather avoid having significant whitespace in committed > files. If I were writing those test cases, I'd commit files that didn't > have trailing whitespace, and convert them to > files-with-trailing-whitespace while running the test. Alternatively, could the pre-commit git hook be adapted to warn the committer about trailing space and ask him for confirmation? I couldn't see an easy way over the weekend, but it might be possible, somehow. [ .... ] -- Alan Mackenzie (Nuremberg, Germany).