summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a9b4c5)
raw | patch | inline | side by side (parent: 7a9b4c5)
author | Jakub Narebski <jnareb@gmail.com> | |
Wed, 21 Jun 2006 07:48:03 +0000 (09:48 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Jun 2006 09:02:01 +0000 (02:02 -0700) |
Add git-core binaries used version as the comment at the beginning of HTML
output, just below the comment with version of git web interface version.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
output, just below the comment with version of git web interface version.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.cgi | patch | blob | history |
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 89224e60b79a8a6fc23bcd5cca21d4bb321dc7fa..87ec565f63847cbf6a3815e5f8756bc6a8d1a889 100755 (executable)
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
# location of the git-core binaries
my $gitbin = "/usr/bin";
+# version of the git-core binaries
+my $git_version = qx($gitbin/git --version);
+if ($git_version =~ m/git version (.*)$/) {
+ $git_version = $1;
+} else {
+ $git_version = "unknown";
+}
+
# location for temporary files needed for diffs
my $git_temp = "/tmp/gitweb";
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface v$version, (C) 2005-2006, Kay Sievers <kay.sievers\@vrfy.org>, Christian Gierke -->
+<!-- git core binaries version $git_version -->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="robots" content="index, nofollow"/>
-<link rel="stylesheet" type="text/css" href="$stylesheet"/>
<title>$title</title>
+<link rel="stylesheet" type="text/css" href="$stylesheet"/>
$rss_link
</head>
<body>
$key =~ s/^gitweb\.//;
return if ($key =~ m/\W/);
- my $val = qx(git-repo-config --get gitweb.$key);
+ my $val = qx($gitbin/git-repo-config --get gitweb.$key);
return ($val);
}