dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Fix scripted diffs with CRs in the commit message #1084

Closed cornelius closed 5 years ago

cornelius commented 5 years ago

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 https://github.com/dtr-org/unit-e/pull/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.

scravy commented 5 years ago

utACK 3049da74f62dc6a4a1b8ac44763c3e3e6459fc72