From: Daniel Marschall Date: Sat, 30 Oct 2021 20:52:01 GMT Subject: Re: git-svn bug: Output git directory has uncommitted changes Message-ID: <48d96db41fbe4400b995d9e9b9e03277@daniel-marschall.de> In-Reply-To: <20211027144111.y43o4qdp3pjp6xsh@tb-raspi4> Am 27.10.2021 16:41, schrieb Torsten Bögershausen: > On Tue, Oct 26, 2021 at 09:30:39PM +0200, Daniel Marschall wrote: >> Am 26.10.2021 17:14, schrieb Torsten Bögershausen: >> >> What I had in mind was the following: >> I have files in my SVN repository which are CRLF, and some files are >> LF. >> I wanted to tell GIT which line ending the files should have >> so that they will have the exact same line endings after the repo is >> checked >> out. I think text=auto will also do this, maybe I should try that. >> >> The "AFS" files are very special, though. Due to compatibility >> reasons, they >> must be in the ancient Macintosh format (CR) otherwise the program >> won't >> work. Do I need to state "eol=cr" then? Or will GIT automatically use >> the >> same line endings as in the files which I have added to SVN? > > Git will not change files with CR as line ending: > When there is neither a LF nor CRLF; then the file is "not text". > > git ls-files --eol | grep "^i/-text" > > Will list png, afs and some other. > You can remove the eol=cr (it doesn't do anything useful, and it is > just confusing) I looked at the git documentation, but I couldn't find an official statement that only "lf" and "crlf" are legal values of "eol". I only found examples of CRLF and LF, but I think that doesn't mean that the lack of a CR example implies that CR is forbidden. Or did I miss something? I think it would be great if "eol=cr" could be implemented. If you have a legacy Mac OS9 project or a project that requires files in a legacy text format, then I think it would be nice if Git could be able to diff these CR-text-files. If I treat them as binary, I think there can't be a text-like diff? > > Better would be: > *.afs -text > or > *.afs binary > > I leave it to the reader, to find out what the difference is. I thought a long time about it, but I can't figure it out. Google can't help me either, because "-text" is will be treated as an exclusion in the search term. Can you please tell me what the difference is? I have the theory that "binary" tells Git to handle it binary, while "-text" tells Git to handle it neither as binary nor as text ("undefined")?