Prevent mutation of line endings when downloading or querying blob content
Summary
Line endings of files are different when downloading or querying file contents via GitLab compared to how they are stored in Git.
-
@justintobler started a discussion: (+4 comments) when I clone this project and inspect the contents of
CRLFlocally I can see the file contains\r\nline-endings. But when I download the file via the UI or query it via GraphQL the line endings are all changed to\n.
Steps to reproduce
- Git clone this example project.
- Open the file called
CRLFin the cloned project and notice the line endings are\r\n. - Download the file via GitLab or query the file contents via GraphQL and notice all line endings are changed to
\n.
| git cloned | downloaded | GraphQL |
|---|---|---|
![]() |
![]() |
![]() |


