emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git refuses to commit files with DOS EOL


From: Paul Eggert
Subject: Re: Git refuses to commit files with DOS EOL
Date: Sun, 31 May 2015 12:54:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Eli Zaretskii wrote:
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.

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 <https://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00037.html>.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]