lilypond-devel
[Top][All Lists]
Advanced

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

Re: Git patch won't apply


From: Trevor Daniels
Subject: Re: Git patch won't apply
Date: Mon, 12 Jan 2009 11:56:05 -0000


Valentin Villenave wrote Monday, January 12, 2009 10:05 AM


2009/1/12 Trevor Daniels <address@hidden>:

Why should you want to turn this off, Valentin?

Because
a) any decent editor (i.e. other than NotePad) recognizes and knows
how to edit LF EOL-ed documents
b) my opera (and I believe that Lily's source code does too) uses only
LF endings
c) so whenever I modified a file under Windows and pushed the result,
all EOL in *this* file would be converted to CRLF while the unmodified
files would remain with LF endings.

I think the moral then is to choose one or the other line ending and never
mix them.

With autocrlf true you should ensure all your editors save with CRLF line
endings, but this is the default in Windows anyway. Git will then convert all the patches to LF endings in its DB but leave all the files in your repository
with CRLF endings.  This is fail-safe for Git, as any stray mixed endings
which might be generated if a file is edited with the opposite convention
are automatically converted.  Files obtained from elsewhere which
might have LF endings cause no problems to Git, of course.

With autocrlf false you have to be sure that all your editors always save
with LF endings, and take care that source files obtained from elsewhere
which might have CRLF endings are always converted to LF endings before
submitting them to Git, as Git will not convert them automatically and will
store all the line ending changes as patches.

I still prefer autocrlf to be true, and I think this is safer for those with
their Git repository in the Windows file store who are new to Git and
editing (not compiling) the source.  It may be necessary to have LF
endings to compile the source code (I don't know if this is a requirement
or not) , but since it is currently not possible to compile the source under
native Windows this is not an issue.

Trevor





reply via email to

[Prev in Thread] Current Thread [Next in Thread]