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: Mon, 01 Jun 2015 18:03:02 +0300 Message-ID: <836177tqs9.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> <83pp5gu8iu.fsf@gnu.org> <556B6707.3050701@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1433171026 13755 80.91.229.3 (1 Jun 2015 15:03:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 15:03:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 01 17:03:32 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 1YzRFU-0000Uz-2t for ged-emacs-devel@m.gmane.org; Mon, 01 Jun 2015 17:03:32 +0200 Original-Received: from localhost ([::1]:52856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzRFT-00035X-2Y for ged-emacs-devel@m.gmane.org; Mon, 01 Jun 2015 11:03:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzRFK-000358-GR for emacs-devel@gnu.org; Mon, 01 Jun 2015 11:03:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzRFF-0003Ip-9l for emacs-devel@gnu.org; Mon, 01 Jun 2015 11:03:22 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:57553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzRFF-0003Ik-1h for emacs-devel@gnu.org; Mon, 01 Jun 2015 11:03:17 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NP900L00TVWN200@mtaout26.012.net.il> for emacs-devel@gnu.org; Mon, 01 Jun 2015 18:05:14 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NP900DPSTWPRT80@mtaout26.012.net.il>; Mon, 01 Jun 2015 18:05:14 +0300 (IDT) In-reply-to: <556B6707.3050701@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.182 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:186972 Archived-At: > Date: Sun, 31 May 2015 12:54:47 -0700 > From: Paul Eggert > CC: emacs-devel@gnu.org > > that > page (and numerous others I've seen) all advise to turn on EOL > conversion, which is simply wrong. > > Shrug. It's right for many projects, probably most. But that's not a topic we need to worry about here. If it is not right for Emacs (and I do hope we agree on that), I don't see why it would be right for many other projects, let alone most. But I agree it's not a topic to worry about here. > 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 > > When I wrote that, I was concerned about portability to older versions of git, where the crlf conversion algorithms were different. I didn't want to worry about the hassle of testing this stuff on older Git versions, so I used a conservative (i.e., loose) setting for the CRLF files. If you can verify that a stricter setting based on cr-at-eol is useful on older Git versions on GNUish platforms, feel free to change to the stricter setting. > > I suggest testing Git 1.7.1 for this, as per . I don't have access to a system with Git 1.7.1, and I cannot find this setting mentioned in the Release Notes (is there a better resource for looking up a Git release number that introduced some feature?). However, according to Git's own git repository, this setting was added in Jan 2008, in a commit about which "git describe" says: $ git describe b2979ff5 v1.5.4-35-gb2979ff So I think it is safe for us to use it. I've pushed a change to that effect. Thanks.