X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/0827180aff4754753e30f768b7c26f5237575a8980847ecd09e4899f3e9c1f9e..61b8e5f83a6c26520b415e1a93584f4ba9610ab9dc78275c19186ea4b928755d:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 9d135b7..f7b5315 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2404,7 +2404,7 @@ sub git_patchset_body { while ($patch_line = <$fd>) { chomp $patch_line; - last EXTENDED_HEADER if ($patch_line =~ m/^--- /); + last EXTENDED_HEADER if ($patch_line =~ m/^--- |^diff /); if ($patch_line =~ m/^index ([0-9a-fA-F]{40})..([0-9a-fA-F]{40})/) { $from_id = $1; @@ -2523,6 +2523,8 @@ sub git_patchset_body { # from-file/to-file diff header $patch_line = $last_patch_line; + last PATCH unless $patch_line; + next PATCH if ($patch_line =~ m/^diff /); #assert($patch_line =~ m/^---/) if DEBUG; if ($from{'href'}) { $patch_line = '--- a/' .