[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: |
Sun, 31 May 2015 17:27:37 +0300 |
> Date: Sat, 30 May 2015 12:40:21 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
>
> 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.