Subversion has the ability to configure EOL for individual files. And in fact, Git also has this in the form of .gitattributes files (attributes "text" and "eol"). For the general case, core.autocrlf is not enough.
If you set it to false, all files with svn: eol-style = native will have an LF line ending in a working copy of git-svn, which is not expected for windows.
If you set it to true, all line endings will be converted to LF and will be sent to SVN as LF (always).
In fact, svn:eol-style=unset must match the '-text' Git attribute (this means no conversion), svn:eol-style=LF --- to the 'eol = lf' attribute and svn:eol-style=CRLF - - to 'eol = crlf attribute; svn:eol-style=native is system dependent, so it can be controlled with the unversioned eol parameter, so the corresponding Git attribute is'! eol '(this would mean getting the EOL setting from core.eol in .git / config).
Instead of git-svn, you can use any solution that converts svn: eol-style to the corresponding .gitattirbutes values ββfor individual files and vice versa. One solution is the server: you install SubGit in your SVN repository and simply use the clean Git interface that SubGit will create:
$ subgit install path/to/svn/repository
Then, on the client, you clone it and set core.eol to "crlf" for Windows and "lf" for another OS (the default value is "lf").
$ git clone <URL> working_tree $ cd working_tree $ git config core.eol crlf
And after that, Git will behave just like SVN.
Alternatively, on the client side, you can use SmartGit : you can clone the SVN repository with it (not open existing git-svn) --- and then it converts svn: eol-style to .gitattributes. For this case, additional core.eol settings are not required, SmartGit will take care of this.
Dmitry Pavlenko
source share