Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore leading spaces on empty context lines in patch files #2015

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

pali6
Copy link
Contributor

@pali6 pali6 commented Nov 27, 2024

Usually git apply does not care about these. However, if the repository is checked out with CRLF line endings, an empty line in the patch context without a leading space results in a "corrupt patch" error. In other cases this change should have no effect.

@pali6 pali6 force-pushed the patch-restore-leading-space branch from 6b704ef to abd464d Compare November 27, 2024 12:06
git apply generally does not care, except for CRLF line endings
with CRLF line endings if an empty line in the patch context does not have a leading space it results in a "corrupt patch" error
@pali6 pali6 force-pushed the patch-restore-leading-space branch from abd464d to 13edda7 Compare November 27, 2024 12:13
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Thanks! :)

@Kobzol Kobzol merged commit 01467a4 into rust-lang:master Nov 28, 2024
11 checks passed
@pali6 pali6 deleted the patch-restore-leading-space branch December 2, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants