X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/e86571b18e62ab5b67c3db72aaccd43572f9c34533f47772d33d0cfd18dd97b8..849289d0ebf066ef09f66c319064276549e5d1cf83941580aa7a4a2c507a6fac:/gitweb.perl
diff --git a/gitweb.perl b/gitweb.perl
index 7d54919..e473e8e 100755
--- a/gitweb.perl
+++ b/gitweb.perl
@@ -835,7 +835,7 @@ sub file_type_long {
## ----------------------------------------------------------------------
## functions returning short HTML fragments, or transforming HTML fragments
-## which don't beling to other sections
+## which don't belong to other sections
# format line of commit message.
sub format_log_line_html {
@@ -987,7 +987,7 @@ sub git_get_project_config {
$key =~ s/^gitweb\.//;
return if ($key =~ m/\W/);
- my @x = (git_cmd(), 'repo-config');
+ my @x = (git_cmd(), 'config');
if (defined $type) { push @x, $type; }
push @x, "--get";
push @x, "gitweb.$key";
@@ -1691,7 +1691,7 @@ sub git_header_html {
my $title = "$site_name";
if (defined $project) {
- $title .= " - $project";
+ $title .= " - " . to_utf8($project);
if (defined $action) {
$title .= "/$action";
if (defined $file_name) {
@@ -1964,7 +1964,7 @@ sub git_print_page_path {
print "
";
print $cgi->a({-href => href(action=>"tree", hash_base=>$hb),
- -title => 'tree root'}, "[$project]");
+ -title => 'tree root'}, to_utf8("[$project]");
print " / ";
if (defined $name) {
my @dirname = split '/', $name;
@@ -2240,7 +2240,7 @@ sub git_difftree_body {
}
print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'},
hash_base=>$hash, file_name=>$diff{'file'})},
- "blob") . " | ";
+ "blob");
print "\n";
} elsif ($diff{'status'} eq "D") { # deleted
@@ -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;
@@ -2413,7 +2413,6 @@ sub git_patchset_body {
push @diff_header, $patch_line;
}
- #last PATCH unless $patch_line;
my $last_patch_line = $patch_line;
# check if current patch belong to current raw line
@@ -2480,11 +2479,11 @@ sub git_patchset_body {
# match
if ($patch_line =~ s!^((copy|rename) from ).*$!$1! && $from{'href'}) {
$patch_line .= $cgi->a({-href=>$from{'href'}, -class=>"path"},
- esc_path($from{'file'}));
+ esc_path($from{'file'}));
}
if ($patch_line =~ s!^((copy|rename) to ).*$!$1! && $to{'href'}) {
- $patch_line = $cgi->a({-href=>$to{'href'}, -class=>"path"},
- esc_path($to{'file'}));
+ $patch_line .= $cgi->a({-href=>$to{'href'}, -class=>"path"},
+ esc_path($to{'file'}));
}
# match
if ($patch_line =~ m/\s(\d{6})$/) {
@@ -2523,8 +2522,13 @@ sub git_patchset_body {
# from-file/to-file diff header
$patch_line = $last_patch_line;
+ if (! $patch_line) {
+ print " \n"; # class="patch"
+ last PATCH;
+ }
+ next PATCH if ($patch_line =~ m/^diff /);
#assert($patch_line =~ m/^---/) if DEBUG;
- if ($from{'href'}) {
+ if ($from{'href'} && $patch_line =~ m!^--- "?a/!) {
$patch_line = '--- a/' .
$cgi->a({-href=>$from{'href'}, -class=>"path"},
esc_path($from{'file'}));
@@ -2532,11 +2536,10 @@ sub git_patchset_body {
print "