How does this work with git-svn and msysgit and are there currently
issues here? I have a windows based svn repository, however whenever I
clone this repository line feeds are being converted. If I commit to
my local git repository and they are stored with LF endings what
happens when I git-svn dcommit? Currently it looks like LFs are being
pushed into the svn repository and my working copying is getting
confused whenever I clone an existing svn repo, claiming text files
have been modified - due to line ending changes.
Darren
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.
For now, I manually turn off autocrlf for each of my git-svn repositories.
Peter Harris
On Fri, Apr 11, 2008 at 11:47 PM, Peter Harris
<pe...@peter.is-a-geek.org> wrote:
> On Fri, Apr 11, 2008 at 4:03 AM, Darren Syzling wrote:
> > How does this work with git-svn and msysgit and are there currently
> > issues here?
> 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.
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.
> 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 --
Best regards,
Clifford Caoile
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