summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e1951f)
raw | patch | inline | side by side (parent: 2e1951f)
author | Jakub Narebski <jnareb@gmail.com> | |
Sun, 7 Jan 2007 01:52:25 +0000 (02:52 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 7 Jan 2007 06:52:54 +0000 (22:52 -0800) |
We now do not skip over empty patches in git_patchset_body (where
empty means that they consist only of git diff header, and of extended
diff header, for example "pure rename" patch). This means that after
extended diff header there can be next patch (i.e. /^diff /) or end of
patchset, and not necessary patch body (i.e. /^--- /).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
empty means that they consist only of git diff header, and of extended
diff header, for example "pure rename" patch). This means that after
extended diff header there can be next patch (i.e. /^diff /) or end of
patchset, and not necessary patch body (i.e. /^--- /).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1b4a4c07b87d3eb32a7ca0fd55bd069b395630b0..7ebdfbbbd5b7011284fd3eb9d78716bc43aeb1cf 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
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;
# 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/' .