On Sat, Apr 12, 2008 at 8:05 AM, Clifford Caoile wrote: > > Peter Harris: > > On Fri, Apr 11, 2008 at 11:47 PM, Peter Harris > <[EMAIL PROTECTED]> wrote: > > > Currently, git-svn doesn't work with autocrlf. The Right Thing to do > > would be for git-svn to convert svn:eol-style properties into a > > .gitattributes file in the repository. Patches Welcome. > > In the case that eol-style appears, I agree.
The absence of svn:eol-style is well defined in Subversion, and it means autocrlf = false. This would (should?) be represented in the generated .gitattributes file (probably as a line that reads "* -crlf" before any other lines). > However can we assume that svn:eol-style is being used? IIRC, the svn > default config is auto-props == no and no file-name-patterns defined. > In other words, nothing is converted, bytes are bytes. Exactly. > > For now, I manually turn off autocrlf for each of my git-svn repositories. > > Just to confirm, do you do this? > > > git svn clone repo-url wk > > rem OMG wk is autocrlf==true > > mkdir wk-no > > move wk\.git wk-no > > rmdir /s/q wk > > cd wk-no > > git config core.autocrlf false > > git checkout HEAD -f -- All my active git repos are git-svn based, so to be perfectly honest, I do: git config --global core.autocrlf false git svn clone url wk (Which is another little white lie - I actually use cron on a Linux box to keep a git-svn mirror up do date, and use a script to set up a usable clone of that, since "git svn clone" takes too long to finish). The repository I use does use svn:eol-style, but my editors all grok LF line endings, so there isn't any problem (unless I accidentally insert CRLF line endings -- say, by using WinMerge between a git-svn checkout and an svn checkout) With your case, you could probably do (untested): git svn clone repo-url wk cd wk rem OMG wk is autocrlf==true git config core.autocrlf false git reset --hard HEAD Peter Harris
