Description of feature
Enforce line feeds in .gitattributes using settings such as
to prevent corruption by core.autocrlf settings.
Background
I recently ran into an edge case likely caused by a misconfigured core.autocrlf setting in git while running nf-core/mag (see the original issue here: nf-core/mag#1050). This caused line endings in a python script to be converted to CRLF in the working tree when nextflow pulled the pipeline (apparently the global git settings apply to nextflow pulls). If the pipeline is run with the apptainer profile (although this might apply to other profiles as well), this corrupts the shebang #!/usr/bin/env python and causes the apptainer to crash. Manual CRLF to LF conversion in the cached repository using dos2unix fixed this issue.
Settings in the .gitattributes file can be used to overrule core.autocrlf to force git (and by extension nextflow) to checkout to LF line endings, preventing this issue.
While this is an edge case, I do not see a scenario in which forced LF line endings would cause issues and therefore request the .gitattributes file be changed accordingly.
Description of feature
Enforce line feeds in
.gitattributesusing settings such asto prevent corruption by
core.autocrlfsettings.Background
I recently ran into an edge case likely caused by a misconfigured
core.autocrlfsetting in git while running nf-core/mag (see the original issue here: nf-core/mag#1050). This caused line endings in a python script to be converted to CRLF in the working tree when nextflow pulled the pipeline (apparently the global git settings apply to nextflow pulls). If the pipeline is run with the apptainer profile (although this might apply to other profiles as well), this corrupts the shebang#!/usr/bin/env pythonand causes the apptainer to crash. Manual CRLF to LF conversion in the cached repository usingdos2unixfixed this issue.Settings in the
.gitattributesfile can be used to overrulecore.autocrlfto force git (and by extension nextflow) to checkout to LF line endings, preventing this issue.While this is an edge case, I do not see a scenario in which forced LF line endings would cause issues and therefore request the
.gitattributesfile be changed accordingly.