Thread (33 messages) flat view 33 messages, 13 authors, 2016-08-11

Re: CRLF problems with Git on Win32

From: Peter Karlsson <hidden>
Date: 2016-06-15 22:44:03

Thomas Neumann:
as a user, I expect a SCM to only modify a file when I have
explicitly asked it to do so.
As a user, I exepect things to just work. With RCS/CVS/Subversion, it
does, because it differentiates between text files (internally encoding
NLs with "LF", but I couldn't care less what it uses there) and binary
files (which it doesn't change). With git it currently doesn't since it
treats everything as binary files.

Yes, it's the whole text vs. binary file issue. We do live in a world
where different systems store text differently. We have to deal with
it. Preferrably, the computer should deal with it without me having to
do anything about it. After all, that's what computers are good at.

If I occasionally need to do a

 git add -kb binary.txt

to flag a file explicitely, that's a small price to pay for everything
else to work out of the box.


FWIW, I wouldn't care if git internally stored all texts as SCSU/BOCU
(or UTF-32, for that matter, if Git's compression engine is better than
SCSU or BOCU) using PARAGRAPH SEPARATOR to separate lines, just as
long as I could get back the text I checked in. Come to think about it,
locale autoconversion of text files would be a nice way to work between
systems that want different encodings, like how Windows prefers
UTF-16LE, Mac OS X prefers UTF-8 and Linux systems prefers whatever I
have set my locale to (I still use iso-8859-1, so shoot me).

-- 
\\// Peter - http://www.softwolves.pp.se/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help