gitweb: Remove forgotten call to git_to_hash
[gitweb.git] / gitweb / gitweb.perl
index 1b352cbb25c525159d06a3c1c2e67f7524a02ff3..68f40bda8f97f4e238d13f0a7f4ad2adafd00198 100755 (executable)
@@ -1358,10 +1358,18 @@ sub git_print_header_div {
 sub git_print_authorship {
        my $co = shift;
 
-       my %ad = parse_date($co->{'author_epoch'});
+       my %ad = parse_date($co->{'author_epoch'}, $co->{'author_tz'});
        print "<div class=\"author_date\">" .
              esc_html($co->{'author_name'}) .
-             " [$ad{'rfc2822'}]</div>\n";
+             " [$ad{'rfc2822'}";
+       if ($ad{'hour_local'} < 6) {
+               printf(" (<span class=\"atnight\">%02d:%02d</span> %s)",
+                      $ad{'hour_local'}, $ad{'minute_local'}, $ad{'tz_local'});
+       } else {
+               printf(" (%02d:%02d %s)",
+                      $ad{'hour_local'}, $ad{'minute_local'}, $ad{'tz_local'});
+       }
+       print "]</div>\n";
 }
 
 sub git_print_page_path {
@@ -2770,10 +2778,6 @@ sub git_blobdiff {
                        @difftree
                                or die_error('404 Not Found', "Blob diff not found");
 
-               } elsif (defined $hash) { # try to find filename from $hash
-                       if ($hash !~ /[0-9a-fA-F]{40}/) {
-                               $hash = git_to_hash($hash);
-                       }
                } elsif (defined $hash &&
                         $hash =~ /[0-9a-fA-F]{40}/) {
                        # try to find filename from $hash