Re: AW: Fixed line endings in the repository

> > 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.

If Windows users are expected to provide text files with Unix line-endings
this could definitely be a problem, the opposite of solution:

  1. They might not be aware of this requirement and would have to live
through an unpleasant surprise as happened with me recently.

  2. They might not be aware of any tools in the Windows world (editors
specifically) that allow easy creation or conversion of text with Windows
line endings to Unix line-ending

All this is better be completely prevented/eliminated and made "invisible"
to Windows users - and this is, per my understanding, what Norm has done.
Thank you Norm.

And it is no-one's business what texts and how one maintains them on their
local computer -- or will we need to be periodically "inspected"? Reserve
times for monthly appointments?

Thanks,
Dimitre


On Wed, Nov 1, 2023 at 12:05 PM Norm Tovey-Walsh <norm@saxonica.com> wrote:

> 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:18:48 UTC