Re: CRLF problems with Git on Win32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 8, 2008 5:07 AM, Peter Harris <peter@xxxxxxxxxxxxxxxxxxx> wrote:
> On Jan 8, 2008 5:56 AM, Peter Karlsson <peter@xxxxxxxxxxxxxxxx> wrote:
> > Thomas Neumann:
> >
> > > as a user, I expect a SCM to only modify a file when I have
> > > explicitly asked it to do so.
> >
> > As a user, I exepect things to just work. With RCS/CVS/Subversion, it
> > does, because it differentiates between text files (internally encoding
> > NLs with "LF", but I couldn't care less what it uses there) and binary
> > files (which it doesn't change). With git it currently doesn't since it
> > treats everything as binary files.
>
> Actually, Subversion does the Right Thing, and treats everything as a
> binary file until and unless you explicitly set the svn:eol-style
> property on each file that you want it to mangle.
>
> Maybe you set up Subversion auto-props and forgot about it? That would
> be almost (but not really) like setting autocrlf=true in your global
> git config.
>
> Peter Harris
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

I'd actually like a feature like this.  On the internal subversion
tree I'm working on (using git-svn), there are quite a bit of files
that have CRLF endings -- we are a cross platform development group.
The solution to this in subversion was that everyone had the same
.subversion/config with a bunch of autoprops set; i.e.:

[auto-props]
*.H = svn:eol-style=native
*.h = svn:eol-style=native
*.CPP = svn:eol-style=native
*.cpp = svn:eol-style=native

and I can't do the same using git-svn.  Thankfully emacs detects CRLFs
and adjusts accordingly, and that's my workaround for it, but it would
be nice to have some kind of gitattribute that allows you to set the
autocrlf according to a filter.

-- 
Kelvie Wong
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux