Skip to content

fix: renormalize gradlew.bat line endings - #10

Merged
ExtraToast merged 1 commit into
mainfrom
fix/renormalize-gradlew-bat
Aug 26, 2026
Merged

ExtraToast merged 1 commit into
mainfrom
fix/renormalize-gradlew-bat

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

gradlew.bat is committed with CRLF in the blob, while .gitattributes declares *.bat text eol=crlf. Git normalises the working tree to LF before comparing it against the index, so the file compares unequal to a CRLF blob and reports as modified immediately after a fresh clone — on every machine and every CI runner. git status is dirty before any edit has been made.

That is not only cosmetic. Tooling that reads a dirty tree as "something changed" is misled by it: the umbrella workspace's nightly submodule sync counted this as a pointer move, staged nothing, and failed on an empty commit on every run until it was taught to ignore dirty submodule content.

Change

git add --renormalize gradlew.bat. The blob now stores LF; the eol=crlf attribute converts it back to CRLF on checkout, so the working tree keeps the CRLF a Windows batch file needs.

Verification

before after
blob CRLF (82 lines) LF
working tree after checkout CRLF CRLF
git status on a fresh clone modified clean

Content is byte-identical apart from line endings: diff of both blobs with CR stripped is empty.

gradlew.bat is committed with CRLF in the blob while .gitattributes declares
`*.bat text eol=crlf`. Git normalizes the working tree to LF before comparing
against the index, so the file reports as modified immediately after a fresh
clone, on every machine and every CI runner. `git status` is dirty before any
edit has been made, and tooling that treats a dirty tree as a change is misled
by it.

The blob now stores LF. The eol=crlf attribute converts it back to CRLF on
checkout, so the working tree keeps the CRLF a Windows batch file needs.
Content is byte-identical apart from line endings.
@ExtraToast ExtraToast added type: bug Something is broken or behaving incorrectly. component: build Gradle, npm, packaging, or local build tooling. labels Aug 26, 2026
@ExtraToast ExtraToast self-assigned this Aug 26, 2026
@ExtraToast
ExtraToast merged commit bd58beb into main Aug 26, 2026
5 checks passed
@ExtraToast
ExtraToast deleted the fix/renormalize-gradlew-bat branch August 26, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: build Gradle, npm, packaging, or local build tooling. type: bug Something is broken or behaving incorrectly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant