How can I safely configure git-svn so I don't unintentionally change line endings when dcommitting to svn?
I'm currently using git's autocrlf=false
and Unix file
shows a mix of line endings:
> file *
actionbutton.lua: ASCII text, with CRLF line terminators
animbutton.lua: ASCII text
And not all files have svn:eol-style
set:
> git svn propget svn:eol-style actionbutton.lua
`actionbutton.lua' does not have a `svn:eol-style' SVN property.
> git svn propget svn:eol-style animbutton.lua
native
This project uses the editorconfig setting end_of_line = crlf
which causes my editor to change line endings in files I edit. I didn't experience this problem when using svn directly (without git-svn).
The svn docs say that svn:eol-style=native
stores line endings as LF:
by default, Subversion doesn't pay any attention to the type of end-of-line (EOL) markers used in your files...
native:
Note that Subversion will actually store the file in the repository using normalized LF EOL markers regardless of the operating system. This is basically transparent to the user, though.
So I guess git-svn is skipping the LF->CRLF process that svn does because I've disabled autocrlf?
If you’re a Windows programmer doing a Windows-only project, then you can turn off this functionality, recording the carriage returns in the repository by setting the config value to false
Everyone's on Windows, so we all expect CRLF. That describes my project, but I can't tell how it's going to interact with svn.