From: Evgeny Grin Date: Sun, 18 Feb 2024 06:36:27 +0000 (+0500) Subject: checksrc.pl: fix handling .checksrc with CRLF X-Git-Tag: curl-8_7_0~174 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=298c120b97c6565f2c053d11c12ccc2592dc40bd;p=thirdparty%2Fcurl.git checksrc.pl: fix handling .checksrc with CRLF - When parsing .checksrc chomp the (CR)LF line ending. Prior to this change on Windows checksrc.pl would not process the symbols in .checksrc properly, since many git repos in Windows use auto crlf to check out files with CRLF line endings. Closes https://github.com/curl/curl/pull/12924 --- diff --git a/scripts/checksrc.pl b/scripts/checksrc.pl index 76f4660816..be085e0613 100755 --- a/scripts/checksrc.pl +++ b/scripts/checksrc.pl @@ -120,6 +120,7 @@ sub readlocalfile { open(my $rcfile, "<", "$dir/.checksrc") or return; while(<$rcfile>) { + $windows_os ? $_ =~ s/\r?\n$// : chomp; $i++; # Lines starting with '#' are considered comments