Since this project might involve developers working on different OS, we have to take a second to make sure we deal with EOL characters in a correct manner. This pull request aims at solving this issue.
Commits:
We need to have a .gitattributes file in order to make sure devs on Windows won't commit Windows-style line endings (CRLF) to the repository that should always use Unix-style line endings (LF). From what I've read (like this), a basic .gitattributes file with * text=auto is probably enough.
Some Windows users might have the setting core.autocrlf=true in their global Git config file which indicates to Git that it should convert LF to CRLF when fetching text files from the repository. This is a problem since the files are meant to run on WSL and not on Windows directly. By forcing core.autocrlf=input during cloning, we make sure that Windows users won't have any issues with an extra "\r" appearing in python scripts, for example.
I ran a small VBA script to check the line endings of files in the current state of the repository. It gave me 4 files that contain CRLF as their line endings. I've changed them back to LF.
Side note regarding commit 3 : Git will detect that all lines from these files have been changed even though nothing has changed except for the line endings. To see there's actually no changes in those files, we can add ?w=1 to the commit URL which gives this showing that there is actually no "real" changes. However, anyone who made changes to any of these files might have some merging conflicts if they try to merge their changes.
Since this project might involve developers working on different OS, we have to take a second to make sure we deal with EOL characters in a correct manner. This pull request aims at solving this issue.
Commits:
We need to have a
.gitattributes
file in order to make sure devs on Windows won't commit Windows-style line endings (CRLF) to the repository that should always use Unix-style line endings (LF). From what I've read (like this), a basic.gitattributes
file with* text=auto
is probably enough.Some Windows users might have the setting
core.autocrlf=true
in their global Git config file which indicates to Git that it should convert LF to CRLF when fetching text files from the repository. This is a problem since the files are meant to run on WSL and not on Windows directly. By forcingcore.autocrlf=input
during cloning, we make sure that Windows users won't have any issues with an extra "\r" appearing in python scripts, for example.I ran a small VBA script to check the line endings of files in the current state of the repository. It gave me 4 files that contain CRLF as their line endings. I've changed them back to LF.
Side note regarding commit 3 : Git will detect that all lines from these files have been changed even though nothing has changed except for the line endings. To see there's actually no changes in those files, we can add
?w=1
to the commit URL which gives this showing that there is actually no "real" changes. However, anyone who made changes to any of these files might have some merging conflicts if they try to merge their changes.