Uh oh!
There was an error while loading. Please reload this page.
fix: respect platform line endings in rustfmt - #3016
Open
CAOShurong wants to merge 1 commit into
Open
Conversation
Use rustfmt's Auto newline style so formatting checks preserve the checkout's native line endings on Windows while retaining LF on Unix-like systems. Assisted-by: OpenAI Codex Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>
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 freeto 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.
This Pull Request fixes/closes#1936.
It changes the following:
core.autocrlf=truecheckout to pass the repository's format check.I followed the checklist:
make checkwithout errors (the full default-feature build needs a complete Perl/OpenSSL toolchain that is not present in this Windows environment)Verification on Windows with
core.autocrlf=true:newline_style=Unixbehavior exits 1 with 162Incorrect newline stylefindings;cargo fmt -- --checkexits 0 with this change;core.autocrlf=falseclone reports index/worktree LF and also passescargo fmt -- --checkwithout changes;cargo nextest run --workspace --no-default-features --features ghemoji,regex-fancy,trace-libgitpasses all 313 tests;git diff --checkpasses and the worktree remains clean after formatting.The change and this description were prepared with OpenAI Codex assistance. I independently reproduced the issue and checked the commands and results above.