Code

gitweb: A couple of page title tweaking
authorJakub Narebski <jnareb@gmail.com>
Tue, 20 Jun 2006 06:17:03 +0000 (06:17 +0000)
committerJunio C Hamano <junkio@cox.net>
Tue, 20 Jun 2006 20:46:30 +0000 (13:46 -0700)
[jc: the e-mailed patch did not apply, so I had to guess but I think
 I got the result right.]

gitweb/gitweb.cgi

index 78e6dd03462c8836743f3879c1d1832d5e9931e9..dd228bab4cf5b7f777cf2457cec8cf4242f5135b 100755 (executable)
@@ -261,6 +261,12 @@ sub git_header_html {
                $title .= " - $project";
                if (defined $action) {
                        $title .= "/$action";
+                       if (defined $file_name) {
+                               $title .= " - $file_name";
+                               if ($action eq "tree" && $file_name !~ m|/$|) {
+                                       $title .= "/";
+                               }
+                       }
                }
        }
        print $cgi->header(-type=>'text/html',  -charset => 'utf-8', -status=> $status, -expires => $expires);