Skip to content

chore: fix gradlew.bat line endings#171

Merged
vroldanbet merged 1 commit into
mainfrom
fix/gradlew-bat-line-endings
May 26, 2026
Merged

chore: fix gradlew.bat line endings#171
vroldanbet merged 1 commit into
mainfrom
fix/gradlew-bat-line-endings

Conversation

@vroldanbet
Copy link
Copy Markdown
Contributor

Summary

  • Re-normalize gradlew.bat so the index stores LF while the working tree keeps CRLF, matching *.bat text eol=crlf in .gitattributes.
  • Fixes the nightly Update API → Create PR for API update workflow, which has been failing on peter-evans/create-pull-request with: error: Your local changes to the following files would be overwritten by checkout: gradlew.bat.

Root cause

91809c3 (dependabot Gradle wrapper bump 8.14-rc-1 → 9.3.1) committed gradlew.bat with CRLF bytes in the blob, undoing the earlier renormalization in cb1517e. With text eol=crlf set, git's clean filter normalizes to LF before hashing, so the working-tree hash never matched the index hash and the file appeared perpetually modified. peter-evans/create-pull-request does git reset --hard origin/main followed by git checkout -B <branch>; the spurious "modified" gradlew.bat made the checkout abort.

Failing run: https://github.com/authzed/authzed-java/actions/runs/26461205567/job/77909187573

Test plan

  • After merge, confirm git status is clean on a fresh checkout of main.
  • Re-run the Update API workflow and verify the Create PR for API update step succeeds.

@vroldanbet vroldanbet marked this pull request as ready for review May 26, 2026 16:49
@vroldanbet vroldanbet requested a review from a team as a code owner May 26, 2026 16:49
@vroldanbet vroldanbet self-assigned this May 26, 2026
The dependabot Gradle-wrapper bump in 91809c3 re-stored gradlew.bat
with CRLF bytes in the blob, undoing the earlier renormalization in
cb1517e. Because .gitattributes declares *.bat text eol=crlf, git's
clean filter normalizes to LF before hashing, so the working tree
hash never matched the index hash and the file appeared perpetually
modified.

That broke the nightly "Update API" workflow: peter-evans/create-pull-request
runs git reset --hard followed by git checkout -B, and the spurious
"modified" gradlew.bat caused the checkout to abort.
@vroldanbet vroldanbet force-pushed the fix/gradlew-bat-line-endings branch from 67724e4 to 2a3a331 Compare May 26, 2026 17:07
@vroldanbet vroldanbet enabled auto-merge May 26, 2026 17:10
Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

LGTM

@vroldanbet vroldanbet added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit 960b543 May 26, 2026
9 checks passed
@vroldanbet vroldanbet deleted the fix/gradlew-bat-line-endings branch May 26, 2026 17:10
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants