Question: Is there a quick way to mark or check the all cpp/h files to see where they all have "eol-style: native"? I don't want to check this property one file for a time.
I found an SVN command in the past the exported all the SVN file properties; not sure what it was.
Edit: My guess on what it was is "svn proplist" http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.proplist.html
I would guess there might be a way to write a script that compares that to the ones without having that properties.
FYI: I think I reported all the files in the past that had the issue. So, you might just try the files newer than 6 months and you are likely to get most of the problem files.
Thanks, indeed those two files were added by me in rev 9920, which is at 2014-09-28. I just add the native eol properties to those two files, and committed the change.
I used a different method to find them. I used SVN export to somehow figure out the ones with the wrong SVN file properties.
Edit: I think I remember what I did; I created an Git Repo with LF line-ending and exported an match SVN repo with LF line-ending.
Then, I copied the SVN export over the git repo and found the changed files. Then, I checked the SVN properties for those file 90% of them did NOT have the correct native line ending set; the other had mixed line-ending in the file.
I had guessed that an well written git attribute file would solve this problem; but, each time I tried it I just seem to cause me problems using the CB Git Repo so; I gave up working on it. Here a link to my last failed attempt at a CB git attribute file https://github.com/stahta01/cb_misc/blob/master/Git-Files/.gitattributes
Tim S.
You method to find the wrong svn-eol-style looks some complex to me.
I read some post about how git-svn handle the eol, it looks like if the file has eol-style=native, then git-svn will import the file as LF in the git repo, see:
EOLs in Git and SVN | About Git, SVN, and other VCS, I quote the text below:
Why not to use git-svn if you care about EOLs?
Git-svn is a perl script that tries to convert Git contents to Subversion and vice versa. But it doesn’t perform EOLs conversion at all (absolutely ignoring svn:eol-style property and Git gitattributes), converting only Subversion repository contents to Git blobs not touching corresponding properties and attributes.
As we know, Subversion keeps all text files with LFs if svn:eol-style=native. So while cloning Subversion repository git-svn converts those text files to blobs with LFs and on Windows Git won’t convert their EOLs to native while checking out (that is inconsistent with Subversion property semantics).
Then, if I have core.autocrlf = auto in my git settings, it should work OK.
About the issue when a new file is created and add to svn, I found another method:
subversion 1.8 repository dictated configuration autoprops, so @Morten, can you try to add the "svn:auto-props" for the root folder of our svn repo, so that the new added cpp/h files can have the eol-style setting automatically set correctly.