Merge branch 'jn/web' into next

* jn/web:
  Move $gitbin earlier in gitweb.cgi
  Add git version to gitweb output
  gitweb: whitespace cleanup
This commit is contained in:
Junio C Hamano 2006-06-21 02:33:43 -07:00
commit 48401221b3
2 changed files with 34 additions and 25 deletions

View File

@ -22,12 +22,20 @@ my $my_url = $cgi->url();
my $my_uri = $cgi->url(-absolute => 1);
my $rss_link = "";
# location of the git-core binaries
my $gitbin = "/usr/bin";
# absolute fs-path which will be prepended to the project path
#my $projectroot = "/pub/scm";
my $projectroot = "/home/kay/public_html/pub/scm";
# 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";
@ -288,11 +296,12 @@ sub git_header_html {
<!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>
@ -816,7 +825,7 @@ sub git_get_project_config {
$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);
}