Repository navigation
fix: renormalize gradlew.bat line endings - #10
Merged
Merged
Conversation
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.
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.
gradlew.batis committed with CRLF in the blob, while.gitattributesdeclares*.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 statusis 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; theeol=crlfattribute converts it back to CRLF on checkout, so the working tree keeps the CRLF a Windows batch file needs.Verification
git statuson a fresh cloneContent is byte-identical apart from line endings:
diffof both blobs with CR stripped is empty.