Re: AW: Fixed line endings in the repository

Christian Grün <cg@basex.org> writes:
> Thanks a lot for spending time on the line-endings challenge. I feel
> bad to ask for yet another change, but would it be possible to never
> change the file ending when checking files out, and to store all files
> with Unix-style line endings? I think this can best be achieved by
> creating a .gitattributes file with a single entry:
>
> * -text eol=lf

I certainly can. I thought I was doing the right thing for folks on
Windows machines.

> With the current .gitattributes setting, all line endings are
> converted to CRLF whenever I check out a file, which makes the local
> and remote files binary-incompatible (as well as existing and new
> local clones of the repository).

How does “binary-incompatible” become noticable? (I’m not suggesting it
doesn’t, I’m just curious.) I would have thought, you check out foo.xml
on a Windows machine, it has Windows line endings, you edit the file,
you commit it, I check out foo.xml, it has Unix line endings, … everyone
is happy.

> That’s why we tend to use Unix-style line endings both locally and
> remotely in our own projects, across different operating systems. Our
> experience is that all Windows tools can cope with that today. It
> would be great if we could use it as default, too.

Fine by me.

> Everyone, please raise your hand if you think it’s worth spending more
> time on this discussion…

I’m inclined to just make the change Christian proposes. I haven’t done
any serious work on a Windows machine since the 90’s so I’m not in a
position to make judgements based on practical experience.

If you *object* to making the line endings on text files explicitly,
always Unix-style, please say so!

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Wednesday, 1 November 2023 19:05:15 UTC