Skip to content

Normalize line endings to LF and add .gitattributes for branch release 1.18#1030

Open
MilindRastogi24 wants to merge 1 commit into
karmada-io:release-1.18from
MilindRastogi24:eliminate-crlf-line-endings-release-1.18
Open

Normalize line endings to LF and add .gitattributes for branch release 1.18#1030
MilindRastogi24 wants to merge 1 commit into
karmada-io:release-1.18from
MilindRastogi24:eliminate-crlf-line-endings-release-1.18

Conversation

@MilindRastogi24

Copy link
Copy Markdown
Contributor

…e-1.18

What type of PR is this?

kind feature

What this PR does / why we need it:
Normalize line endings to LF and add .gitattributes for the main branch

Enforce LF line endings repository-wide and convert 29 files that were
committed with CRLF.

Which issue(s) this PR fixes:
Part of #1026

Special notes for your reviewer:

…e-1.18

Signed-off-by: MilindRastogi24 <milindrastogicloud@gmail.com>
@karmada-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rainbowmango for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds a .gitattributes file to normalize line endings across the repository and applies minor formatting and translation updates to various documentation files. The review feedback correctly points out that Windows batch files (.bat and .cmd) require CRLF line endings to execute properly, and suggests adding explicit rules for them in .gitattributes to override the global LF setting.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .gitattributes
Comment on lines +17 to +18
# Shell scripts must use LF
*.sh text eol=lf

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Windows batch files (.bat and .cmd) require CRLF line endings to execute correctly in Windows environments. Since the global rule * text=auto eol=lf forces LF line endings on all text files, any batch files added to the repository will be checked out with LF line endings, which can cause syntax and execution errors on Windows. It is recommended to explicitly configure CRLF for these file extensions.

# Shell scripts must use LF
*.sh text eol=lf

# Windows batch files must use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf

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

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants