From: "Torsten Bögershausen" <tboegi@web.de>
To: git@vger.kernel.org, jpyeron@pdinc.us
Subject: Re: A head scratcher, clone results in modified files (tested linux and cygwin) - .gitattributes file?
Date: Sun, 9 Oct 2016 12:27:11 +0200 [thread overview]
Message-ID: <c9c90c24-3bf7-cd57-cad6-db28db16f323@web.de> (raw)
In-Reply-To: <7E06D61EACFB462AB96DD60720930968@black7>
On 09/10/16 08:48, Jason Pyeron wrote:
The whole .gitattributes needs to be adopted, I think
Git 2.10 or higher has "git ls-files --eol":
git ls-files --eol | grep "i/crlf.*auto"
i/crlf w/crlf attr/text=auto src/site/xdoc/upgradeto2_3.xml
i/crlf w/crlf attr/text=auto
src/test/resources/org/apache/commons/io/FileUtilsTestDataCRLF.dat
i/crlf w/crlf attr/text=auto src/test/resources/test-file-gbk.bin
i/crlf w/crlf attr/text=auto
src/test/resources/test-file-iso8859-1-shortlines-win-linebr.bin
i/crlf w/crlf attr/text=auto src/test/resources/test-file-utf8-win-linebr.bin
i/crlf w/crlf attr/text=auto src/test/resources/test-file-windows-31j.bin
i/crlf w/crlf attr/text=auto src/test/resources/test-file-x-windows-949.bin
i/crlf w/crlf attr/text=auto src/test/resources/test-file-x-windows-950.bin
############
Problem:
xml file had been commited with CRLF : either normalize it or declare "-text".
The same is valid for the other files as well.
They are identified by auto as text, and commited with CRLF.
My feeling is that they should be declared as "-text".
Or, to be more compatible, with "-crlf":
Solution:
Make up your mind about the xml file and the html files.
If they are text, they need to be normalized.
Question:
What happens, if you do this:
# Auto detect text files and perform LF normalization
* crlf=auto
*.bin -crlf
*.dat -crlf
*.java crlf diff=java
*.html crlf diff=html
*.css crlf
*.js crlf
*.sql crlf
next prev parent reply other threads:[~2016-10-09 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 6:48 A head scratcher, clone results in modified files (tested linux and cygwin) - .gitattributes file? Jason Pyeron
2016-10-09 10:27 ` Torsten Bögershausen [this message]
2016-10-09 12:48 ` Jason Pyeron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9c90c24-3bf7-cd57-cad6-db28db16f323@web.de \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=jpyeron@pdinc.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).