X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/efea54ac4d226e0216b040881734821a0901faf7d8034bf64e5daa32d140ccb5..be731a362b6c8212efe520e1166c163e04ef7dbeb7c3c31feb971ad4847d29b0:/gitweb.cgi diff --git a/gitweb.cgi b/gitweb.cgi index 69326f6..8ec96cd 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -10,11 +10,12 @@ use strict; use warnings; use CGI qw(:standard :escapeHTML); +use CGI::Util qw(unescape); use CGI::Carp qw(fatalsToBrowser); use Fcntl ':mode'; my $cgi = new CGI; -my $version = "118"; +my $version = "152"; my $my_url = $cgi->url(); my $my_uri = $cgi->url(-absolute => 1); my $rss_link = ""; @@ -29,11 +30,14 @@ my $gitbin = "/usr/bin"; my $gittmp = "/tmp/gitweb"; # target of the home link on top of all pages -my $home_link = "/git"; +my $home_link = $my_uri; + +# html text to include at home page +my $home_text = "indextext.html"; # source of projects list #my $projects_list = $projectroot; -my $projects_list = "index/index.txt"; +my $projects_list = "index/index.aux"; # input validation and dispatch my $action = $cgi->param('a'); @@ -47,7 +51,7 @@ if (defined $action) { exit; } } else { - $action = "log"; + $action = "summary"; } my $project = $cgi->param('p'); @@ -69,9 +73,10 @@ if (defined $project) { die_error(undef, "No such project."); } $rss_link = ""; + $ENV{'GIT_OBJECT_DIRECTORY'} = "$projectroot/$project/objects"; $ENV{'SHA1_FILE_DIRECTORY'} = "$projectroot/$project/objects"; } else { - git_project_list($projects_list); + git_project_list(); exit; } @@ -113,7 +118,16 @@ if (defined $time_back) { } } -if ($action eq "blob") { +if ($action eq "summary") { + git_summary(); + exit; +} elsif ($action eq "branches") { + git_branches(); + exit; +} elsif ($action eq "tags") { + git_tags(); + exit; +} elsif ($action eq "blob") { git_blob(); exit; } elsif ($action eq "tree") { @@ -163,49 +177,48 @@ sub git_header_html { $title $rss_link