summaryrefslogtreecommitdiffstats
path: root/gitweb.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
commitc14e6ad9a230ad90c84b7f620d87fbe49a2d0342 (patch)
tree120346dc383e3d1c4219fe8c533eb22cb6af2b55 /gitweb.html
parent2a4bcbc355496c8d83b1b9f8892c4cbe8f584158 (diff)
downloadgit-htmldocs-c14e6ad9a230ad90c84b7f620d87fbe49a2d0342.tar.gz
Autogenerated HTML docs for v2.2.0-rc0
Diffstat (limited to 'gitweb.html')
-rw-r--r--gitweb.html222
1 files changed, 110 insertions, 112 deletions
diff --git a/gitweb.html b/gitweb.html
index eac806c7f..0c942ebe4 100644
--- a/gitweb.html
+++ b/gitweb.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>gitweb(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p {
ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img {
margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] {
*
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody {
@media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) {
function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) {
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () {
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -823,24 +821,24 @@ repository root, i.e. be all under a single parent repository (but see also
projects' root" subsection).</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>our $projectroot = '/path/to/parent/directory';</tt></pre>
+<pre><code>our $projectroot = '/path/to/parent/directory';</code></pre>
</div></div>
-<div class="paragraph"><p>The default value for <tt>$projectroot</tt> is <em>/pub/git</em>. You can change it during
-building gitweb via <tt>GITWEB_PROJECTROOT</tt> build configuration variable.</p></div>
-<div class="paragraph"><p>By default all Git repositories under <tt>$projectroot</tt> are visible and available
+<div class="paragraph"><p>The default value for <code>$projectroot</code> is <em>/pub/git</em>. You can change it during
+building gitweb via <code>GITWEB_PROJECTROOT</code> build configuration variable.</p></div>
+<div class="paragraph"><p>By default all Git repositories under <code>$projectroot</code> are visible and available
to gitweb. The list of projects is generated by default by scanning the
-<tt>$projectroot</tt> directory for Git repositories (for object databases to be
+<code>$projectroot</code> directory for Git repositories (for object databases to be
more exact; gitweb is not interested in a working area, and is best suited
to showing "bare" repositories).</p></div>
-<div class="paragraph"><p>The name of the repository in gitweb is the path to its <tt>$GIT_DIR</tt> (its object
-database) relative to <tt>$projectroot</tt>. Therefore the repository $repo can be
+<div class="paragraph"><p>The name of the repository in gitweb is the path to its <code>$GIT_DIR</code> (its object
+database) relative to <code>$projectroot</code>. Therefore the repository $repo can be
found at "$projectroot/$repo".</p></div>
</div>
<div class="sect2">
<h3 id="_projects_list_file_format">Projects list file format</h3>
<div class="paragraph"><p>Instead of having gitweb find repositories by scanning filesystem
starting from $projectroot, you can provide a pre-generated list of
-visible projects by setting <tt>$projects_list</tt> to point to a plain text
+visible projects by setting <code>$projects_list</code> to point to a plain text
file with a list of projects (with some additional info).</p></div>
<div class="paragraph"><p>This file uses the following format:</p></div>
<div class="ulist"><ul>
@@ -858,7 +856,7 @@ Leading and trailing whitespace are ignored.
<li>
<p>
Whitespace separated fields; any run of whitespace can be used as field
-separator (rules for Perl&#8217;s "<tt>split(" ", $line)</tt>").
+separator (rules for Perl&#8217;s "<code>split(" ", $line)</code>").
</p>
</li>
<li>
@@ -883,7 +881,7 @@ Currently recognized fields are:
</dt>
<dd>
<p>
- path to repository GIT_DIR, relative to <tt>$projectroot</tt>
+ path to repository GIT_DIR, relative to <code>$projectroot</code>
</p>
</dd>
<dt class="hdlist1">
@@ -904,14 +902,14 @@ Currently recognized fields are:
<div class="paragraph"><p>Example contents:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>foo.git Joe+R+Hacker+&lt;joe@example.com&gt;
-foo/bar.git O+W+Ner+&lt;owner@example.org&gt;</tt></pre>
+<pre><code>foo.git Joe+R+Hacker+&lt;joe@example.com&gt;
+foo/bar.git O+W+Ner+&lt;owner@example.org&gt;</code></pre>
</div></div>
<div class="paragraph"><p>By default this file controls only which projects are <strong>visible</strong> on projects
list page (note that entries that do not point to correctly recognized Git
repositories won&#8217;t be displayed by gitweb). Even if a project is not
visible on projects list page, you can view it nevertheless by hand-crafting
-a gitweb URL. By setting <tt>$strict_export</tt> configuration variable (see
+a gitweb URL. By setting <code>$strict_export</code> configuration variable (see
<a href="gitweb.conf.html">gitweb.conf(5)</a>) to true value you can allow viewing only of
repositories also shown on the overview page (i.e. only projects explicitly
listed in projects list file will be accessible).</p></div>
@@ -922,15 +920,15 @@ listed in projects list file will be accessible).</p></div>
<em>gitweb_config.perl</em>. Put the following in <em>gitweb_make_index.perl</em> file:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>read_config_file("gitweb_config.perl");
-$projects_list = $projectroot;</tt></pre>
+<pre><code>read_config_file("gitweb_config.perl");
+$projects_list = $projectroot;</code></pre>
</div></div>
<div class="paragraph"><p>Then create the following script to get list of project in the format
suitable for GITWEB_LIST build configuration variable (or
-<tt>$projects_list</tt> variable in gitweb config):</p></div>
+<code>$projects_list</code> variable in gitweb config):</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>#!/bin/sh
+<pre><code>#!/bin/sh
export GITWEB_CONFIG="gitweb_make_index.perl"
export GATEWAY_INTERFACE="CGI/1.1"
@@ -938,15 +936,15 @@ export HTTP_ACCEPT="*/*"
export REQUEST_METHOD="GET"
export QUERY_STRING="a=project_index"
-perl -- /var/www/cgi-bin/gitweb.cgi</tt></pre>
+perl -- /var/www/cgi-bin/gitweb.cgi</code></pre>
</div></div>
<div class="paragraph"><p>Run this script and save its output to a file. This file could then be used
-as projects list file, which means that you can set <tt>$projects_list</tt> to its
+as projects list file, which means that you can set <code>$projects_list</code> to its
filename.</p></div>
</div>
<div class="sect2">
<h3 id="_controlling_access_to_git_repositories">Controlling access to Git repositories</h3>
-<div class="paragraph"><p>By default all Git repositories under <tt>$projectroot</tt> are visible and
+<div class="paragraph"><p>By default all Git repositories under <code>$projectroot</code> are visible and
available to gitweb. You can however configure how gitweb controls access
to repositories.</p></div>
<div class="ulist"><ul>
@@ -954,28 +952,28 @@ to repositories.</p></div>
<p>
As described in "Projects list file format" section, you can control which
projects are <strong>visible</strong> by selectively including repositories in projects
-list file, and setting <tt>$projects_list</tt> gitweb configuration variable to
-point to it. With <tt>$strict_export</tt> set, projects list file can be used to
+list file, and setting <code>$projects_list</code> gitweb configuration variable to
+point to it. With <code>$strict_export</code> set, projects list file can be used to
control which repositories are <strong>available</strong> as well.
</p>
</li>
<li>
<p>
You can configure gitweb to only list and allow viewing of the explicitly
-exported repositories, via <tt>$export_ok</tt> variable in gitweb config file; see
+exported repositories, via <code>$export_ok</code> variable in gitweb config file; see
<a href="gitweb.conf.html">gitweb.conf(5)</a> manpage. If it evaluates to true, gitweb shows
-repositories only if this file named by <tt>$export_ok</tt> exists in its object
-database (if directory has the magic file named <tt>$export_ok</tt>).
+repositories only if this file named by <code>$export_ok</code> exists in its object
+database (if directory has the magic file named <code>$export_ok</code>).
</p>
-<div class="paragraph"><p>For example <a href="git-daemon.html">git-daemon(1)</a> by default (unless <tt>--export-all</tt> option
+<div class="paragraph"><p>For example <a href="git-daemon.html">git-daemon(1)</a> by default (unless <code>--export-all</code> option
is used) allows pulling only for those repositories that have
<em>git-daemon-export-ok</em> file. Adding</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>our $export_ok = "git-daemon-export-ok";</tt></pre>
+<pre><code>our $export_ok = "git-daemon-export-ok";</code></pre>
</div></div>
<div class="paragraph"><p>makes gitweb show and allow access only to those repositories that can be
-fetched from via <tt>git://</tt> protocol.</p></div>
+fetched from via <code>git://</code> protocol.</p></div>
</li>
<li>
<p>
@@ -990,7 +988,7 @@ can use the following hook to allow access only if the user is
authorized to read the files:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$export_auth_hook = sub {
+<pre><code>$export_auth_hook = sub {
use Apache2::SubRequest ();
use Apache2::Const -compile =&gt; qw(HTTP_OK);
my $path = "$_[0]/HEAD";
@@ -998,7 +996,7 @@ authorized to read the files:</p></div>
my $sub = $r-&gt;lookup_file($path);
return $sub-&gt;filename eq $path
&amp;&amp; $sub-&gt;status == Apache2::Const::HTTP_OK;
-};</tt></pre>
+};</code></pre>
</div></div>
</li>
</ul></div>
@@ -1016,59 +1014,59 @@ README.html
<dd>
<p>
A html file (HTML fragment) which is included on the gitweb project
- "summary" page inside <tt>&lt;div&gt;</tt> block element. You can use it for longer
+ "summary" page inside <code>&lt;div&gt;</code> block element. You can use it for longer
description of a project, to provide links (for example to project&#8217;s
homepage), etc. This is recognized only if XSS prevention is off
- (<tt>$prevent_xss</tt> is false, see <a href="gitweb.conf.html">gitweb.conf(5)</a>); a way to include
+ (<code>$prevent_xss</code> is false, see <a href="gitweb.conf.html">gitweb.conf(5)</a>); a way to include
a README safely when XSS prevention is on may be worked out in the
future.
</p>
</dd>
<dt class="hdlist1">
-description (or <tt>gitweb.description</tt>)
+description (or <code>gitweb.description</code>)
</dt>
<dd>
<p>
- Short (shortened to <tt>$projects_list_description_width</tt> in the projects
+ Short (shortened to <code>$projects_list_description_width</code> in the projects
list page, which is 25 characters by default; see
<a href="gitweb.conf.html">gitweb.conf(5)</a>) single line description of a project (of a
repository). Plain text file; HTML will be escaped. By default set to
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>Unnamed repository; edit this file to name it for gitweb.</tt></pre>
+<pre><code>Unnamed repository; edit this file to name it for gitweb.</code></pre>
</div></div>
<div class="paragraph"><p>from the template during repository creation, usually installed in
-<em>/usr/share/git-core/templates/</em>. You can use the <tt>gitweb.description</tt> repo
+<em>/usr/share/git-core/templates/</em>. You can use the <code>gitweb.description</code> repo
configuration variable, but the file takes precedence.</p></div>
</dd>
<dt class="hdlist1">
-category (or <tt>gitweb.category</tt>)
+category (or <code>gitweb.category</code>)
</dt>
<dd>
<p>
Singe line category of a project, used to group projects if
- <tt>$projects_list_group_categories</tt> is enabled. By default (file and
+ <code>$projects_list_group_categories</code> is enabled. By default (file and
configuration variable absent), uncategorized projects are put in the
- <tt>$project_list_default_category</tt> category. You can use the
- <tt>gitweb.category</tt> repo configuration variable, but the file takes
+ <code>$project_list_default_category</code> category. You can use the
+ <code>gitweb.category</code> repo configuration variable, but the file takes
precedence.
</p>
-<div class="paragraph"><p>The configuration variables <tt>$projects_list_group_categories</tt> and
-<tt>$project_list_default_category</tt> are described in <a href="gitweb.conf.html">gitweb.conf(5)</a></p></div>
+<div class="paragraph"><p>The configuration variables <code>$projects_list_group_categories</code> and
+<code>$project_list_default_category</code> are described in <a href="gitweb.conf.html">gitweb.conf(5)</a></p></div>
</dd>
<dt class="hdlist1">
-cloneurl (or multiple-valued <tt>gitweb.url</tt>)
+cloneurl (or multiple-valued <code>gitweb.url</code>)
</dt>
<dd>
<p>
File with repository URL (used for clone and fetch), one per line.
Displayed in the project summary page. You can use multiple-valued
- <tt>gitweb.url</tt> repository configuration variable for that, but the file
+ <code>gitweb.url</code> repository configuration variable for that, but the file
takes precedence.
</p>
<div class="paragraph"><p>This is per-repository enhancement / version of global prefix-based
-<tt>@git_base_url_list</tt> gitweb configuration variable (see
+<code>@git_base_url_list</code> gitweb configuration variable (see
<a href="gitweb.conf.html">gitweb.conf(5)</a>).</p></div>
</dd>
<dt class="hdlist1">
@@ -1076,22 +1074,22 @@ gitweb.owner
</dt>
<dd>
<p>
- You can use the <tt>gitweb.owner</tt> repository configuration variable to set
+ You can use the <code>gitweb.owner</code> repository configuration variable to set
repository&#8217;s owner. It is displayed in the project list and summary
page.
</p>
<div class="paragraph"><p>If it&#8217;s not set, filesystem directory&#8217;s owner is used (via GECOS field,
-i.e. real name field from <strong>getpwuid</strong>(3)) if <tt>$projects_list</tt> is unset
-(gitweb scans <tt>$projectroot</tt> for repositories); if <tt>$projects_list</tt>
+i.e. real name field from <strong>getpwuid</strong>(3)) if <code>$projects_list</code> is unset
+(gitweb scans <code>$projectroot</code> for repositories); if <code>$projects_list</code>
points to file with list of repositories, then project owner defaults to
value from this file for given repository.</p></div>
</dd>
<dt class="hdlist1">
-various <tt>gitweb.*</tt> config variables (in config)
+various <code>gitweb.*</code> config variables (in config)
</dt>
<dd>
<p>
- Read description of <tt>%feature</tt> hash for detailed list, and descriptions.
+ Read description of <code>%feature</code> hash for detailed list, and descriptions.
See also "Configuring gitweb features" section in <a href="gitweb.conf.html">gitweb.conf(5)</a>
</p>
</dd>
@@ -1107,7 +1105,7 @@ information via query parameters. The typical gitweb URLs are broken down in to
five components:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>.../gitweb.cgi/&lt;repo&gt;/&lt;action&gt;/&lt;revision&gt;:/&lt;path&gt;?&lt;arguments&gt;</tt></pre>
+<pre><code>.../gitweb.cgi/&lt;repo&gt;/&lt;action&gt;/&lt;revision&gt;:/&lt;path&gt;?&lt;arguments&gt;</code></pre>
</div></div>
<div class="dlist"><dl>
<dt class="hdlist1">
@@ -1160,7 +1158,7 @@ pathnames. In most general form such path_info (component) based gitweb URL
looks like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>.../gitweb.cgi/&lt;repo&gt;/&lt;action&gt;/&lt;revision_from&gt;:/&lt;path_from&gt;..&lt;revision_to&gt;:/&lt;path_to&gt;?&lt;arguments&gt;</tt></pre>
+<pre><code>.../gitweb.cgi/&lt;repo&gt;/&lt;action&gt;/&lt;revision_from&gt;:/&lt;path_from&gt;..&lt;revision_to&gt;:/&lt;path_to&gt;?&lt;arguments&gt;</code></pre>
</div></div>
<div class="paragraph"><p>Each action is implemented as a subroutine, and must be present in %actions
hash. Some actions are disabled by default, and must be turned on via feature
@@ -1168,7 +1166,7 @@ mechanism. For example to enable <em>blame</em> view add the following to gitwe
configuration file:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$feature{'blame'}{'default'} = [1];</tt></pre>
+<pre><code>$feature{'blame'}{'default'} = [1];</code></pre>
</div></div>
<div class="sect2">
<h3 id="_actions">Actions:</h3>
@@ -1330,8 +1328,8 @@ atom
<h2 id="_webserver_configuration">WEBSERVER CONFIGURATION</h2>
<div class="sectionbody">
<div class="paragraph"><p>This section explains how to configure some common webservers to run gitweb. In
-all cases, <tt>/path/to/gitweb</tt> in the examples is the directory you ran installed
-gitweb in, and contains <tt>gitweb_config.perl</tt>.</p></div>
+all cases, <code>/path/to/gitweb</code> in the examples is the directory you ran installed
+gitweb in, and contains <code>gitweb_config.perl</code>.</p></div>
<div class="paragraph"><p>If you&#8217;ve configured a web server that isn&#8217;t listed here for gitweb, please send
in the instructions so they can be included in a future release.</p></div>
<div class="sect2">
@@ -1341,19 +1339,19 @@ which gitweb is installed. Let&#8217;s assume that it is <em>/var/www/cgi-bin</
directory.</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
+<pre><code>ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
&lt;Directory "/var/www/cgi-bin"&gt;
Options Indexes FollowSymlinks ExecCGI
AllowOverride None
Order allow,deny
Allow from all
-&lt;/Directory&gt;</tt></pre>
+&lt;/Directory&gt;</code></pre>
</div></div>
<div class="paragraph"><p>With that configuration the full path to browse repositories would be:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://server/cgi-bin/gitweb.cgi</tt></pre>
+<pre><code>http://server/cgi-bin/gitweb.cgi</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -1365,7 +1363,7 @@ this support.</p></div>
Apache configuration (for mod_perl 2.x) is suitable.</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>Alias /perl "/var/www/perl"
+<pre><code>Alias /perl "/var/www/perl"
&lt;Directory "/var/www/perl"&gt;
SetHandler perl-script
@@ -1375,12 +1373,12 @@ Apache configuration (for mod_perl 2.x) is suitable.</p></div>
AllowOverride None
Order allow,deny
Allow from all
-&lt;/Directory&gt;</tt></pre>
+&lt;/Directory&gt;</code></pre>
</div></div>
<div class="paragraph"><p>With that configuration the full path to browse repositories would be:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://server/perl/gitweb.cgi</tt></pre>
+<pre><code>http://server/perl/gitweb.cgi</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -1391,18 +1389,18 @@ installed in <em>/usr/share/gitweb</em> directory. The following Apache
configuration is suitable (UNTESTED!)</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>FastCgiServer /usr/share/gitweb/gitweb.cgi
+<pre><code>FastCgiServer /usr/share/gitweb/gitweb.cgi
ScriptAlias /gitweb /usr/share/gitweb/gitweb.cgi
Alias /gitweb/static /usr/share/gitweb/static
&lt;Directory /usr/share/gitweb/static&gt;
SetHandler default-handler
-&lt;/Directory&gt;</tt></pre>
+&lt;/Directory&gt;</code></pre>
</div></div>
<div class="paragraph"><p>With that configuration the full path to browse repositories would be:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://server/gitweb</tt></pre>
+<pre><code>http://server/gitweb</code></pre>
</div></div>
</div>
</div>
@@ -1410,15 +1408,15 @@ Alias /gitweb/static /usr/share/gitweb/static
<div class="sect1">
<h2 id="_advanced_web_server_setup">ADVANCED WEB SERVER SETUP</h2>
<div class="sectionbody">
-<div class="paragraph"><p>All of those examples use request rewriting, and need <tt>mod_rewrite</tt>
+<div class="paragraph"><p>All of those examples use request rewriting, and need <code>mod_rewrite</code>
(or equivalent; examples below are written for Apache).</p></div>
<div class="sect2">
<h3 id="_single_url_for_gitweb_and_for_fetching">Single URL for gitweb and for fetching</h3>
-<div class="paragraph"><p>If you want to have one URL for both gitweb and your <tt>http://</tt>
+<div class="paragraph"><p>If you want to have one URL for both gitweb and your <code>http://</code>
repositories, you can configure Apache like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>&lt;VirtualHost *:80&gt;
+<pre><code>&lt;VirtualHost *:80&gt;
ServerName git.example.org
DocumentRoot /pub/git
SetEnv GITWEB_CONFIG /etc/gitweb.conf
@@ -1432,14 +1430,14 @@ repositories, you can configure Apache like this:</p></div>
# make access for "dumb clients" work
RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \
/cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
-&lt;/VirtualHost&gt;</tt></pre>
+&lt;/VirtualHost&gt;</code></pre>
</div></div>
<div class="paragraph"><p>The above configuration expects your public repositories to live under
-<em>/pub/git</em> and will serve them as <tt>http://git.domain.org/dir-under-pub-git</tt>,
+<em>/pub/git</em> and will serve them as <code>http://git.domain.org/dir-under-pub-git</code>,
both as clonable Git URL and as browseable gitweb interface. If you then
-start your <a href="git-daemon.html">git-daemon(1)</a> with <tt>--base-path=/pub/git --export-all</tt>
-then you can even use the <tt>git://</tt> URL with exactly the same path.</p></div>
-<div class="paragraph"><p>Setting the environment variable <tt>GITWEB_CONFIG</tt> will tell gitweb to use the
+start your <a href="git-daemon.html">git-daemon(1)</a> with <code>--base-path=/pub/git --export-all</code>
+then you can even use the <code>git://</code> URL with exactly the same path.</p></div>
+<div class="paragraph"><p>Setting the environment variable <code>GITWEB_CONFIG</code> will tell gitweb to use the
named file (i.e. in this example <em>/etc/gitweb.conf</em>) as a configuration for
gitweb. You don&#8217;t really need it in above example; it is required only if
your configuration file is in different place than built-in (during
@@ -1451,10 +1449,10 @@ something like the following in your gitweb configuration file
(<em>/etc/gitweb.conf</em> following example):</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>@stylesheets = ("/some/absolute/path/gitweb.css");
+<pre><code>@stylesheets = ("/some/absolute/path/gitweb.css");
$my_uri = "/";
$home_link = "/";
-$per_request_config = 1;</tt></pre>
+$per_request_config = 1;</code></pre>
</div></div>
<div class="paragraph"><p>Nowadays though gitweb should create HTML base tag when needed (to set base
URI for relative links), so it should work automatically.</p></div>
@@ -1467,7 +1465,7 @@ Apache virtual host and gitweb configuration files in the following way.</p></di
like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>&lt;VirtualHost *:80&gt;
+<pre><code>&lt;VirtualHost *:80&gt;
ServerName git.example.org
DocumentRoot /pub/git
SetEnv GITWEB_CONFIG /etc/gitweb.conf
@@ -1500,24 +1498,24 @@ like this:</p></div>
# make access for "dumb clients" work
RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \
/cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
-&lt;/VirtualHost&gt;</tt></pre>
+&lt;/VirtualHost&gt;</code></pre>
</div></div>
-<div class="paragraph"><p>Here actual project root is passed to gitweb via <tt>GITWEB_PROJECT_ROOT</tt>
+<div class="paragraph"><p>Here actual project root is passed to gitweb via <code>GITWEB_PROJECT_ROOT</code>
environment variable from a web server, so you need to put the following
line in gitweb configuration file (<em>/etc/gitweb.conf</em> in above example):</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/pub/git";</tt></pre>
+<pre><code>$projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/pub/git";</code></pre>
</div></div>
<div class="paragraph"><p><strong>Note</strong> that this requires to be set for each request, so either
-<tt>$per_request_config</tt> must be false, or the above must be put in code
-referenced by <tt>$per_request_config</tt>;</p></div>
-<div class="paragraph"><p>These configurations enable two things. First, each unix user (<tt>&lt;user&gt;</tt>) of
+<code>$per_request_config</code> must be false, or the above must be put in code
+referenced by <code>$per_request_config</code>;</p></div>
+<div class="paragraph"><p>These configurations enable two things. First, each unix user (<code>&lt;user&gt;</code>) of
the server will be able to browse through gitweb Git repositories found in
<em>~/public_git/</em> with the following url:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://git.example.org/~&lt;user&gt;/</tt></pre>
+<pre><code>http://git.example.org/~&lt;user&gt;/</code></pre>
</div></div>
<div class="paragraph"><p>If you do not want this feature on your server just remove the second
rewrite rule.</p></div>
@@ -1525,7 +1523,7 @@ rewrite rule.</p></div>
use the '~&#8217; as first character, just comment or remove the second rewrite
rule, and uncomment one of the following according to what you want.</p></div>
<div class="paragraph"><p>Second, repositories found in <em>/pub/scm/</em> and <em>/var/git/</em> will be accessible
-through <tt>http://git.example.org/scm/</tt> and <tt>http://git.example.org/var/</tt>.
+through <code>http://git.example.org/scm/</code> and <code>http://git.example.org/var/</code>.
You can add as many project roots as you want by adding rewrite rules like
the third and the fourth.</p></div>
</div>
@@ -1534,13 +1532,13 @@ the third and the fourth.</p></div>
<div class="paragraph"><p>If you enable PATH_INFO usage in gitweb by putting</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$feature{'pathinfo'}{'default'} = [1];</tt></pre>
+<pre><code>$feature{'pathinfo'}{'default'} = [1];</code></pre>
</div></div>
<div class="paragraph"><p>in your gitweb configuration file, it is possible to set up your server so
that it consumes and produces URLs in the form</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://git.example.com/project.git/shortlog/sometag</tt></pre>
+<pre><code>http://git.example.com/project.git/shortlog/sometag</code></pre>
</div></div>
<div class="paragraph"><p>i.e. without <em>gitweb.cgi</em> part, by using a configuration such as the
following. This configuration assumes that <em>/var/www/gitweb</em> is the
@@ -1548,7 +1546,7 @@ DocumentRoot of your webserver, contains the gitweb.cgi script and
complementary static files (stylesheet, favicon, JavaScript):</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>&lt;VirtualHost *:80&gt;
+<pre><code>&lt;VirtualHost *:80&gt;
ServerAlias git.example.com
DocumentRoot /var/www/gitweb
@@ -1564,13 +1562,13 @@ complementary static files (stylesheet, favicon, JavaScript):</p></div>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
&lt;/Directory&gt;
-&lt;/VirtualHost&gt;</tt></pre>
+&lt;/VirtualHost&gt;</code></pre>
</div></div>
<div class="paragraph"><p>The rewrite rule guarantees that existing static files will be properly
served, whereas any other URL will be passed to gitweb as PATH_INFO
parameter.</p></div>
<div class="paragraph"><p><strong>Notice</strong> that in this case you don&#8217;t need special settings for
-<tt>@stylesheets</tt>, <tt>$my_uri</tt> and <tt>$home_link</tt>, but you lose "dumb client"
+<code>@stylesheets</code>, <code>$my_uri</code> and <code>$home_link</code>, but you lose "dumb client"
access to your project .git dirs (described in "Single URL for gitweb and
for fetching" section). A possible workaround for the latter is the
following: in your project root dir (e.g. <em>/pub/git</em>) have the projects
@@ -1578,7 +1576,7 @@ named <strong>without</strong> a .git extension (e.g. <em>/pub/git/project</em>
<em>/pub/git/project.git</em>) and configure Apache as follows:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>&lt;VirtualHost *:80&gt;
+<pre><code>&lt;VirtualHost *:80&gt;
ServerAlias git.example.com
DocumentRoot /var/www/gitweb
@@ -1595,25 +1593,25 @@ named <strong>without</strong> a .git extension (e.g. <em>/pub/git/project</em>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
&lt;/Directory&gt;
-&lt;/VirtualHost&gt;</tt></pre>
+&lt;/VirtualHost&gt;</code></pre>
</div></div>
<div class="paragraph"><p>The additional AliasMatch makes it so that</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://git.example.com/project.git</tt></pre>
+<pre><code>http://git.example.com/project.git</code></pre>
</div></div>
<div class="paragraph"><p>will give raw access to the project&#8217;s Git dir (so that the project can be
cloned), while</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://git.example.com/project</tt></pre>
+<pre><code>http://git.example.com/project</code></pre>
</div></div>
<div class="paragraph"><p>will provide human-friendly gitweb access.</p></div>
<div class="paragraph"><p>This solution is not 100% bulletproof, in the sense that if some project has
a named ref (branch, tag) starting with <em>git/</em>, then paths such as</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://git.example.com/project/command/abranch..git/abranch</tt></pre>
+<pre><code>http://git.example.com/project/command/abranch..git/abranch</code></pre>
</div></div>
<div class="paragraph"><p>will fail with a 404 error.</p></div>
</div>