From aa1e96cd44f6d5cd77a96648ac1f2dbcca9dc367 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 4 Jan 2020 04:19:33 +0000 Subject: solver: allow literal '\r' character in diff lines While filenames are escaped, the actual diff contents may contain an unescaped "\r" carriage return byte not in front of the "\n" line feed. So just allow "\r" to appear in the middle of a line. --- lib/PublicInbox/SolverGit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index eab8459b..5ac27988 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -155,7 +155,7 @@ sub extract_diff ($$) { # the meat of the diff, including "^\\No newline ..." # We also allow for totally blank lines w/o leading spaces, # because git-apply(1) handles that case, too - (?:^(?:[\@\+\x20\-\\][^\r\n]*|)$LF)+ + (?:^(?:[\@\+\x20\-\\][^\n]*|)$LF)+ )!smx or return; my $di = { -- cgit v1.2.3-24-ge0c7