git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH] Add git version to gitweb output
Date: Tue, 20 Jun 2006 15:59:59 +0000 (UTC)
Date: wto, 20 cze 2006 17:59:19 +0200	[thread overview]
Message-ID: <11508191591838-git-send-email-jnareb@gmail.com> (raw)

---

 gitweb/gitweb.cgi |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

09a68749cb29e1f0add3ac9859c11cd0924f70c7
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 89224e6..87ec565 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -29,6 +29,14 @@ my $projectroot = "/home/kay/public_html
 # 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);
 }
 
-- 
1.3.0

                 reply	other threads:[~2006-06-20 15:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11508191591838-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).