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.
# 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 = {
# TODO: convert these to self-contained test cases
my $todo = {
'git' => [
+ '9e9048b02bd04d287461543d85db0bb715b89f8c'
+ .'/s/?b=t%2Ft3420%2Fremove-ids.sed',
'eebf7a8/s/?b=t%2Ftest-lib.sh',
'eb580ca513/s/?b=remote-odb.c',
'776fa90f7f/s/?b=contrib/git-jump/git-jump',