X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/61b8e5f83a6c26520b415e1a93584f4ba9610ab9dc78275c19186ea4b928755d..849289d0ebf066ef09f66c319064276549e5d1cf83941580aa7a4a2c507a6fac:/gitweb.perl
diff --git a/gitweb.perl b/gitweb.perl
index f7b5315..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
@@ -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
@@ -2523,10 +2522,13 @@ sub git_patchset_body {
# from-file/to-file diff header
$patch_line = $last_patch_line;
- last PATCH unless $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'}));
@@ -2534,11 +2536,10 @@ sub git_patchset_body {
print "$patch_line
\n";
$patch_line = <$fd>;
- last PATCH unless $patch_line;
chomp $patch_line;
#assert($patch_line =~ m/^+++/) if DEBUG;
- if ($to{'href'}) {
+ if ($to{'href'} && $patch_line =~ m!^\+\+\+ "?b/!) {
$patch_line = '+++ b/' .
$cgi->a({-href=>$to{'href'}, -class=>"path"},
esc_path($to{'file'}));
@@ -3610,7 +3611,7 @@ sub git_snapshot {
$hash = git_get_head_hash($project);
}
- my $filename = basename($project) . "-$hash.tar.$suffix";
+ my $filename = to_utf8(basename($project)) . "-$hash.tar.$suffix";
print $cgi->header(
-type => "application/$ctype",