summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 823d5dc)
raw | patch | inline | side by side (parent: 823d5dc)
author | Kay Sievers <kay.sievers@suse.de> | |
Sun, 7 Aug 2005 17:58:12 +0000 (19:58 +0200) | ||
committer | Kay Sievers <kay.sievers@suse.de> | |
Sun, 7 Aug 2005 17:58:12 +0000 (19:58 +0200) |
gitweb.pl | patch | blob | history |
diff --git a/gitweb.pl b/gitweb.pl
index 25bd65e5f27f4c058546e16ba13f71cc785a252b..8bd8127343bd503cc3de5cb75e84fa77d7142cfd 100755 (executable)
--- a/gitweb.pl
+++ b/gitweb.pl
# gitweb.pl - simple web interface to track changes in git repositories
#
-# Version 005
+# Version 006
#
# (C) 2005, Kay Sievers <kay.sievers@vrfy.org>
# (C) 2005, Christian Gierke <ch@gierke.de>
my $gitroot = "/home/kay/public_html";
my $gittmp = "/tmp";
my $myself = $cgi->url(-relative => 1);
+my $url_path = $cgi->url(-path => 1);
my $project = $cgi->param("project") || "";
my $action = $cgi->param("action") || "";
my $hash = $cgi->param("hash") || "";
my $hash_parent = $cgi->param("hash_parent") || "";
my $view_back = $cgi->param("view_back") || 60*60*24;
+
+if ($url_path =~ m#/([^/]+)/commit/([0-9a-fA-F]+)$#) {
+ $project = $1;
+ $action = "commit";
+ $hash = $2;
+} elsif ($url_path =~ m#/([^/]+)/treediff/([0-9a-fA-F]+)$#) {
+ $project = $1;
+ $action = "treediff";
+ $hash = $2;
+} elsif ($url_path =~ m#/([^/]+)/diff/([0-9a-fA-F]+)/([0-9a-fA-F]+)$#) {
+ $project = $1;
+ $action = "treediff";
+ $hash = $2;
+ $hash_parent = $3;
+} elsif ($url_path =~ m#/([^/]+)/log/([0-9]+)$#) {
+ $project = $1;
+ $action = "log";
+ $view_back = $2;
+} elsif ($url_path =~ m#/([^/]+)/log#) {
+ $project = $1;
+ $action = "log";
+ $view_back = 60*60*24;
+}
my $projectroot = "$gitroot/$project";
+
$hash =~ s/[^0-9a-fA-F]//g;
$hash_parent =~ s/[^0-9a-fA-F]//g;
$project =~ s/[^0-9a-zA-Z\-\._]//g;
$author = $1;
$author_time = $2;
$author_timezone = $3;
- $author =~ m/^(.*) </;
- $author_name = $1;
}
}
$shortlog = <$fd>;