From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Git refuses to commit files with DOS EOL Date: Sun, 31 May 2015 17:27:37 +0300 Message-ID: <83pp5gu8iu.fsf@gnu.org> References: <83pp5iuxry.fsf@gnu.org> <5569E6E5.4050205@cs.ucla.edu> <836179vrts.fsf@gnu.org> <556A06DA.80008@cs.ucla.edu> <83y4k5uavg.fsf@gnu.org> <556A1225.9070904@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1433082486 25220 80.91.229.3 (31 May 2015 14:28:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 May 2015 14:28:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 31 16:27:57 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 1Yz4DU-0006CD-7Q for ged-emacs-devel@m.gmane.org; Sun, 31 May 2015 16:27:56 +0200 Original-Received: from localhost ([::1]:42228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz4DT-0004Sj-EW for ged-emacs-devel@m.gmane.org; Sun, 31 May 2015 10:27:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz4DP-0004ST-MB for emacs-devel@gnu.org; Sun, 31 May 2015 10:27:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yz4DM-0005Ev-Gr for emacs-devel@gnu.org; Sun, 31 May 2015 10:27:51 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:59624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz4DM-0005Eo-8w for emacs-devel@gnu.org; Sun, 31 May 2015 10:27:48 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NP700B00X9QVE00@mtaout29.012.net.il> for emacs-devel@gnu.org; Sun, 31 May 2015 17:27:04 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NP7006VHXH4LF50@mtaout29.012.net.il>; Sun, 31 May 2015 17:27:04 +0300 (IDT) In-reply-to: <556A1225.9070904@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:186966 Archived-At: > Date: Sat, 30 May 2015 12:40:21 -0700 > From: Paul Eggert > CC: emacs-devel@gnu.org > > if some other project using Git doesn't have a pre-commit > hook, do I still need to make these changes in .gitattributes for > files with DOS EOLs? > > It depends on the maintenance style the other project wants to use, and which versions of Git they want to require (as this stuff has changed since older Git versions). It's a long story. For an intro, please see: > > http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ Thanks, but that doesn't even mention 'whitespace'. It talks only about EOL conversion, which, as I've said, is disabled in my Git installation (core.autcrlf is unset, which means it's false by default). I hope everybody else here does the same, although that page (and numerous others I've seen) all advise to turn on EOL conversion, which is simply wrong. After reading all that stuff, including the gitattributes man page, I have only one question: why files like dostorture.c are marked "-whitespace" and not "whitespace=cr-at-eol"? The latter seems to be more specific, and still allows detection of trailing whitespace in files with DOS-style EOL.