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

Fix scripted diffs with CRs in the commit message #1084

Merged
merged 1 commit into from
May 8, 2019

Conversation

cornelius
Copy link
Member

GitHub inserts line endings using CRs in some cases when squashing
commits. This causes issues in case of scripted diffs where the
script is extracted from the commit message by commit-script-check.sh.

This patch fixes this by removing CRs at the end of the line before
extracting the script for checking the commit.

This issue made the lint check on #1083 fail. With this patch the lint check should work again on that PR.

You can test the change locally by calling commit-script-check.sh manually with a commit range which includes a scripted diff. I tested with test/lint/commit-script-check.sh 9978e63..a52d88e which is the commit with the scripted diff we added in #1072.

GitHub inserts line endings using CRs in some cases when squashing
commits. This causes issues in case of scripted diffs where the
script is extracted from the commit message by `commit-script-check.sh`.

This patch fixes this by removing CRs at the end of the line before
extracting the script for checking the commit.

Signed-off-by: Cornelius Schumacher <[email protected]>
@cornelius cornelius added the ci Continuous integration label May 8, 2019
@scravy
Copy link
Member

scravy commented May 8, 2019

utACK 3049da7

Copy link
Member

@Gnappuraz Gnappuraz left a comment

Choose a reason for hiding this comment

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

utACK 3049da7

Copy link
Member

@cmihai cmihai left a comment

Choose a reason for hiding this comment

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

ACK 3049da7
Tested manually, script is being executed.

@cornelius cornelius merged commit e446593 into dtr-org:master May 8, 2019
@cornelius cornelius deleted the fix-scripted-diff branch May 8, 2019 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants