Add .gitattributes for consistent line-ending handling#8394
Merged
Conversation
Without .gitattributes, line endings depend on each contributor's local core.autocrlf setting (defaults to true on Windows, false on Linux). On cross-platform checkouts — e.g. a Windows enlistment mounted into a Linux container or WSL — every text file appears modified because the working tree has CRLF while blobs are LF. Add a minimal .gitattributes at the repo root with `* text=auto` to normalize text files consistently across platforms, plus binary markers so common binary file types are not normalized. The parent NAV repo uses a similar approach and does not exhibit this issue.
gggdttt
approved these changes
Jun 2, 2026
stkillen
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without .gitattributes, line endings depend on each contributors local
core.autocrlfsetting (defaults totrueon Windows,falseon Linux). On cross-platform checkouts — e.g. a Windows enlistment mounted into a Linux container or WSL — every text file appears modified because the working tree has CRLF while blobs are LF.Adds a minimal
.gitattributesat the repo root with* text=autoto normalize text files consistently across platforms, plus binary markers so common binary file types are not normalized.The parent NAV repo uses a similar approach and does not exhibit this issue.
Repro
core.autocrlf=trueglobally), clone BCApps. Git writes CRLF to the working tree; blobs in.git/are LF.git status --porcelaininside WSL/container lists hundreds of tracked files as modified.git diff <any-file>shows only CRLF/LF differences;git diff --ignore-cr-at-eolis empty.AB#631442