From: Jakub Narebski Date: Wed, 21 Jun 2006 07:48:03 +0000 (+0200) Subject: Add git version to gitweb output X-Git-Tag: v1.4.1-rc1~2^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ae20de5386f74dbde991186694cfdac323b21e47;p=git.git 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 --- diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 89224e60b..87ec565f6 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); }