[Top][All Lists]

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

Re: Git refuses to commit files with DOS EOL

From: Eli Zaretskii
Subject: Re: Git refuses to commit files with DOS EOL
Date: Mon, 01 Jun 2015 18:03:02 +0300

> Date: Sun, 31 May 2015 12:54:47 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
>     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 
> <https://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00037.html>.

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

So I think it is safe for us to use it.

I've pushed a change to that effect.


reply via email to

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