Skip to content

Commit 2e1951f

Browse files
jnarebJunio C Hamano
authored andcommitted
gitweb: Fix error in "rename to"/"copy to" git diff header output
Fix error in git_patchset_body subroutine, which caused "rename to"/"copy to" line in extended diff header to be displayed incorrectly. While at it, fix align. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 62e4f26 commit 2e1951f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,11 +2479,11 @@ sub git_patchset_body {
24792479
# match <path>
24802480
if ($patch_line =~ s!^((copy|rename) from ).*$!$1! && $from{'href'}) {
24812481
$patch_line .= $cgi->a({-href=>$from{'href'}, -class=>"path"},
2482-
esc_path($from{'file'}));
2482+
esc_path($from{'file'}));
24832483
}
24842484
if ($patch_line =~ s!^((copy|rename) to ).*$!$1! && $to{'href'}) {
2485-
$patch_line = $cgi->a({-href=>$to{'href'}, -class=>"path"},
2486-
esc_path($to{'file'}));
2485+
$patch_line .= $cgi->a({-href=>$to{'href'}, -class=>"path"},
2486+
esc_path($to{'file'}));
24872487
}
24882488
# match <mode>
24892489
if ($patch_line =~ m/\s(\d{6})$/) {

0 commit comments

Comments
 (0)