blob: 6d661d824cadab3117ffd9293143ea83a221a3ea [file] [log] [blame]
Lars Hjemli25105d72006-12-10 22:31:36 +01001
Lars Hjemlidcef2572006-12-13 02:06:29 +01002 cgit - cgi for git
Lars Hjemli25105d72006-12-10 22:31:36 +01003
4
Lars Hjemli66414b62007-01-28 13:18:23 +01005This is an attempt to create a fast web interface for the git scm, using a
6builtin cache to decrease server io-pressure.
Lars Hjemli25105d72006-12-10 22:31:36 +01007
Lars Hjemli25105d72006-12-10 22:31:36 +01008
Lars Hjemli66414b62007-01-28 13:18:23 +01009Installation
10
Lars Hjemli5a217ed2007-05-11 12:13:15 +020011 $ make
Lars Hjemlic52e8412007-02-04 23:57:34 +010012 $ su
Lars Hjemli5a217ed2007-05-11 12:13:15 +020013 $ make install
14
15This will install cgit.cgi and cgit.css into "/var/www/htdocs/cgit".
16
17Note: The initial "make" will create a submodule 'git' and clone the git
18repository at git://git.kernel.org/pub/scm/git/git.git in it. If you
19already have a local git git repository that you want to use as origin
20for the submodule, run
21
22 $ git clone -s <path-to-git-repo> git
23 $ ./submodules.sh -u
24
25before running "make".
Lars Hjemli66414b62007-01-28 13:18:23 +010026
Lars Hjemlic52e8412007-02-04 23:57:34 +010027
Lars Hjemli5a217ed2007-05-11 12:13:15 +020028Dependencies
Lars Hjemlic52e8412007-02-04 23:57:34 +010029
Lars Hjemli5a217ed2007-05-11 12:13:15 +020030 -git (1.5.2-rc0 or newer, due to git submodule) installed
31 -zip lib
32 -crypto lib
33 -openssl lib
Lars Hjemlic52e8412007-02-04 23:57:34 +010034
Lars Hjemli5a217ed2007-05-11 12:13:15 +020035
36Apache configuration
37
38A new Directory-section must probably be added for cgit, possibly something
39like this:
Lars Hjemlic52e8412007-02-04 23:57:34 +010040
41 <Directory "/var/www/htdocs/cgit/">
42 AllowOverride None
43 Options ExecCGI
44 Order allow,deny
45 Allow from all
46 </Directory>
Lars Hjemli66414b62007-01-28 13:18:23 +010047
48
49Runtime configuration
50
Lars Hjemlic52e8412007-02-04 23:57:34 +010051The file /etc/cgitrc is read by cgit before handling a request. In addition
Lars Hjemli5a217ed2007-05-11 12:13:15 +020052to runtime parameters, this file also contains a list of the repositories
Lars Hjemlic52e8412007-02-04 23:57:34 +010053displayed by cgit.
54
55A template cgitrc is shipped with the sources, and all parameters and default
Lars Hjemli5a217ed2007-05-11 12:13:15 +020056values are documented in this file.
Lars Hjemli66414b62007-01-28 13:18:23 +010057
58
59The cache
60
Lars Hjemli5a217ed2007-05-11 12:13:15 +020061When cgit is invoked it looks for a cachefile matching the request and
62returns it to the client. If no such cachefile exist (or if it has expired),
Lars Hjemli66414b62007-01-28 13:18:23 +010063the content for the request is written into the proper cachefile before the
64file is returned.
65
Lars Hjemli5a217ed2007-05-11 12:13:15 +020066If the cachefile has expired but cgit is unable to obtain a lock for it, the
Lars Hjemli66414b62007-01-28 13:18:23 +010067stale cachefile is returned to the client. This is done to favour page
Lars Hjemlidcef2572006-12-13 02:06:29 +010068throughput over page freshness.
Lars Hjemli25105d72006-12-10 22:31:36 +010069
Lars Hjemli66414b62007-01-28 13:18:23 +010070The generated content contains the complete response to the client, including
71the http-headers "Modified" and "Expires".
Lars Hjemli5a217ed2007-05-11 12:13:15 +020072
73
74The mis(sing) features
75
76Submodule links in the directory listing page have a fixed format per
77repository. This should probably be extended to a generic map between
78submodule path and url.
79
80
81The end.