On Thu, Mar 29, 2012 at 3:00 PM, David Sommerseth <openvpn.l...@topphemmelig.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 29/03/12 14:51, Alon Bar-Lev wrote: >> This is not good. Another issue of this MIME magic that should be >> avoided. VC files are CRLF, if we do not commit them this way, >> every time they change we see a complete rewrite. >> >> If you do not want to pull, please do: >> >> find . -name '*.sln' -or -name '*.vcxproj.*' | xargs unix2dos >> >> And commit. > > We had quite some clean-up rounds on CR/LF issues quite a while ago. > After a lot of testing and searching the net, we found out that > keeping the git tree NL only would be an advantage. And CR/LF issues > would be avoided when setting 'git config --global core.autocrlf true' > on Windows boxes. This makes git add CR/LF when checking out files > from the repo automatically, and it will be stripped out when > committing files. > > It's also described here: > <https://community.openvpn.net/openvpn/wiki/GitCrashCourse#Otherneatfeaturestoenable> > > Can you please double check if this works for you? Then we don't have > to bother with the CR/LF issues at all, as it's mostly automatic.
No, this is no good. First global configuration of repository is wrong, as people tend to have different global configurations. Second, I don't trust the automatic detection of text files. Third, there are files that must be CRLF no mater if I check it on cygwin, or Linux and use samba share to access the files I still need a valid configuration. I suggest to remove this global setting and use local setting by suffix, something like: .gitattributes --- *.c eol=lf *.h eol=lf *.vc*proj* eol=crlf *.sln eol=crlf --- Alon.