From ae20de5386f74dbde991186694cfdac323b21e47 Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Wed, 21 Jun 2006 09:48:03 +0200 Subject: Add git version to gitweb output 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 Signed-off-by: Junio C Hamano --- gitweb/gitweb.cgi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gitweb/gitweb.cgi') diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 89224e60b7..87ec565f63 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -29,6 +29,14 @@ 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 { + - $title + $rss_link @@ -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); } -- cgit v1.2.3