Skip to content

Conversation

@Guiorgy
Copy link

@Guiorgy Guiorgy commented Nov 12, 2025

Depending on how git is configured on Windows, git may attempt to normalize text file line endings to CRLF (/r/n), which results in broken Docker containers being built, as, for example, the entry point shell script fails to execute.

This PR adds the .gitattributes file instructing git to force LF (/n) line endings on text files.

Summary by CodeRabbit

  • Chores
    • Updated repository configuration to ensure consistent line ending handling across platforms.

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Walkthrough

A .gitattributes file is added to configure automatic text file detection and normalize line endings to LF across the repository, ensuring consistent line ending behavior across different operating systems.

Changes

Cohort / File(s) Summary
Git Configuration
\.gitattributes
Adds new .gitattributes file with text=auto and eol=lf settings to auto-detect text files and normalize line endings to LF

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Line endings unite, from Windows to Mac,
LF all the way, no turning back!
A tiny config, but oh so clean,
The tidiest repository I've ever seen! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely captures the main change: adding a .gitattributes file to enforce LF line endings across the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@dpage
Copy link
Contributor

dpage commented Nov 14, 2025

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.gitattributes (1)

2-2: Consider more granular .gitattributes rules for better control.

Applying text=auto eol=lf to all files via the wildcard * is overly broad. While this addresses the stated goal of normalizing line endings, a more targeted approach allows finer control over different file types. For example:

  • Shell scripts and other text files that require LF
  • Windows-specific files (.bat, .cmd) that may need CRLF
  • Binary files that should not be normalized
  • Generated or vendored files that may have specific requirements

Consider structuring the rules more granularly (e.g., *.sh text eol=lf, *.bat text eol=crlf, etc.) to avoid unintended side effects.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e472ec and 3f68ee9.

📒 Files selected for processing (1)
  • .gitattributes (1 hunks)
🔇 Additional comments (1)
.gitattributes (1)

2-2: Verify the wildcard rule won't cause issues with platform-specific or generated files.

The blanket text=auto eol=lf for all files could unexpectedly normalize line endings in files that require platform-specific behavior (e.g., Windows batch files) or generated artifacts. Verify that this configuration aligns with the project's expectations across all file types and platforms.

Depending on how git is configured on Windows, git may attempt to normalize text file line endings to CRLF (\r\n), which results in broken Docker containers being built
@Guiorgy
Copy link
Author

Guiorgy commented Nov 14, 2025

Oops, a bad rebase when using a shallow clone 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants