Autogenerated HTML docs for v2.47.0-288-g090d2
[git-htmldocs.git] / gitweb.html
blob81789bc6ab7b24c7bb5edccb6f21958a5285403c
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3 <head>
4 <meta charset="UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7 <meta name="generator" content="Asciidoctor 2.0.20"/>
8 <title>gitweb(1)</title>
9 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
10 <style>
11 /*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
12 /* Uncomment the following line when using as a custom stylesheet */
13 /* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
14 html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15 a{background:none}
16 a:focus{outline:thin dotted}
17 a:active,a:hover{outline:0}
18 h1{font-size:2em;margin:.67em 0}
19 b,strong{font-weight:bold}
20 abbr{font-size:.9em}
21 abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22 dfn{font-style:italic}
23 hr{height:0}
24 mark{background:#ff0;color:#000}
25 code,kbd,pre,samp{font-family:monospace;font-size:1em}
26 pre{white-space:pre-wrap}
27 q{quotes:"\201C" "\201D" "\2018" "\2019"}
28 small{font-size:80%}
29 sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30 sup{top:-.5em}
31 sub{bottom:-.25em}
32 img{border:0}
33 svg:not(:root){overflow:hidden}
34 figure{margin:0}
35 audio,video{display:inline-block}
36 audio:not([controls]){display:none;height:0}
37 fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38 legend{border:0;padding:0}
39 button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40 button,input{line-height:normal}
41 button,select{text-transform:none}
42 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43 button[disabled],html input[disabled]{cursor:default}
44 input[type=checkbox],input[type=radio]{padding:0}
45 button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46 textarea{overflow:auto;vertical-align:top}
47 table{border-collapse:collapse;border-spacing:0}
48 *,::before,::after{box-sizing:border-box}
49 html,body{font-size:100%}
50 body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
51 a:hover{cursor:pointer}
52 img,object,embed{max-width:100%;height:auto}
53 object,embed{height:100%}
54 img{-ms-interpolation-mode:bicubic}
55 .left{float:left!important}
56 .right{float:right!important}
57 .text-left{text-align:left!important}
58 .text-right{text-align:right!important}
59 .text-center{text-align:center!important}
60 .text-justify{text-align:justify!important}
61 .hide{display:none}
62 img,object,svg{display:inline-block;vertical-align:middle}
63 textarea{height:auto;min-height:50px}
64 select{width:100%}
65 .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
66 div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
67 a{color:#2156a5;text-decoration:underline;line-height:inherit}
68 a:hover,a:focus{color:#1d4b8f}
69 a img{border:0}
70 p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71 p aside{font-size:.875em;line-height:1.35;font-style:italic}
72 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
73 h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
74 h1{font-size:2.125em}
75 h2{font-size:1.6875em}
76 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77 h4,h5{font-size:1.125em}
78 h6{font-size:1em}
79 hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80 em,i{font-style:italic;line-height:inherit}
81 strong,b{font-weight:bold;line-height:inherit}
82 small{font-size:60%;line-height:inherit}
83 code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84 ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85 ul,ol{margin-left:1.5em}
86 ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87 ul.circle{list-style-type:circle}
88 ul.disc{list-style-type:disc}
89 ul.square{list-style-type:square}
90 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91 ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92 dl dt{margin-bottom:.3125em;font-weight:bold}
93 dl dd{margin-bottom:1.25em}
94 blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95 blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
96 @media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
97 h1{font-size:2.75em}
98 h2{font-size:2.3125em}
99 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100 h4{font-size:1.4375em}}
101 table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102 table thead,table tfoot{background:#f7f8f7}
103 table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
104 table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105 table tr.even,table tr.alt{background:#f8f8f7}
106 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108 h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
109 .center{margin-left:auto;margin-right:auto}
110 .stretch{width:100%}
111 .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
112 .clearfix::after,.float-group::after{clear:both}
113 :not(pre).nobreak{word-wrap:normal}
114 :not(pre).nowrap{white-space:nowrap}
115 :not(pre).pre-wrap{white-space:pre-wrap}
116 :not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
117 pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119 pre>code{display:block}
120 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121 em em{font-style:normal}
122 strong strong{font-weight:400}
123 .keyseq{color:rgba(51,51,51,.8)}
124 kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
125 .keyseq kbd:first-child{margin-left:0}
126 .keyseq kbd:last-child{margin-right:0}
127 .menuseq,.menuref{color:#000}
128 .menuseq b:not(.caret),.menuref{font-weight:inherit}
129 .menuseq{word-spacing:-.02em}
130 .menuseq b.caret{font-size:1.25em;line-height:.8}
131 .menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
132 b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133 b.button::before{content:"[";padding:0 3px 0 2px}
134 b.button::after{content:"]";padding:0 2px 0 3px}
135 p a>code:hover{color:rgba(0,0,0,.9)}
136 #header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
137 #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
138 #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
139 #content{margin-top:1.25em}
140 #content::before{content:none}
141 #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
142 #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
143 #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
144 #header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
145 #header .details span:first-child{margin-left:-.125em}
146 #header .details span.email a{color:rgba(0,0,0,.85)}
147 #header .details br{display:none}
148 #header .details br+span::before{content:"\00a0\2013\00a0"}
149 #header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
150 #header .details br+span#revremark::before{content:"\00a0|\00a0"}
151 #header #revnumber{text-transform:capitalize}
152 #header #revnumber::after{content:"\00a0"}
153 #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
154 #toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
155 #toc>ul{margin-left:.125em}
156 #toc ul.sectlevel0>li>a{font-style:italic}
157 #toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
158 #toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
159 #toc li{line-height:1.3334;margin-top:.3334em}
160 #toc a{text-decoration:none}
161 #toc a:active{text-decoration:underline}
162 #toctitle{color:#7a2518;font-size:1.2em}
163 @media screen and (min-width:768px){#toctitle{font-size:1.375em}
164 body.toc2{padding-left:15em;padding-right:0}
165 #toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
166 #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
167 #toc.toc2>ul{font-size:.9em;margin-bottom:0}
168 #toc.toc2 ul ul{margin-left:0;padding-left:1em}
169 #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
170 body.toc2.toc-right{padding-left:0;padding-right:15em}
171 body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
172 @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
173 #toc.toc2{width:20em}
174 #toc.toc2 #toctitle{font-size:1.375em}
175 #toc.toc2>ul{font-size:.95em}
176 #toc.toc2 ul ul{padding-left:1.25em}
177 body.toc2.toc-right{padding-left:0;padding-right:20em}}
178 #content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
179 #content #toc>:first-child{margin-top:0}
180 #content #toc>:last-child{margin-bottom:0}
181 #footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
182 #footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
183 #content{margin-bottom:.625em}
184 .sect1{padding-bottom:.625em}
185 @media screen and (min-width:768px){#content{margin-bottom:1.25em}
186 .sect1{padding-bottom:1.25em}}
187 .sect1:last-child{padding-bottom:0}
188 .sect1+.sect1{border-top:1px solid #e7e7e9}
189 #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
190 #content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
191 #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
192 #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
193 #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
194 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
195 details{margin-left:1.25rem}
196 details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197 details>summary::-webkit-details-marker{display:none}
198 details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
199 details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
200 details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
201 .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
202 table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
203 .paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
204 .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
205 .admonitionblock>table td.icon{text-align:center;width:80px}
206 .admonitionblock>table td.icon img{max-width:none}
207 .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
208 .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
209 .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
210 .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
211 .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
212 .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
213 .exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
214 .exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
215 .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
216 @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
217 @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
218 .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
219 .literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
220 .listingblock>.content{position:relative}
221 .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
222 .listingblock:hover code[data-lang]::before{display:block}
223 .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
224 .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
225 .listingblock pre.highlightjs{padding:0}
226 .listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
227 .listingblock pre.prettyprint{border-width:0}
228 .prettyprint{background:#f7f7f8}
229 pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
230 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
231 pre.prettyprint li code[data-lang]::before{opacity:1}
232 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233 table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
234 table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
235 table.linenotable td.code{padding-left:.75em}
236 table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
237 pre.pygments span.linenos{display:inline-block;margin-right:.75em}
238 .quoteblock{margin:0 1em 1.25em 1.5em;display:table}
239 .quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
240 .quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
241 .quoteblock blockquote{margin:0;padding:0;border:0}
242 .quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
243 .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
244 .quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
245 .verseblock{margin:0 1em 1.25em}
246 .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
247 .verseblock pre strong{font-weight:400}
248 .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
249 .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
250 .quoteblock .attribution br,.verseblock .attribution br{display:none}
251 .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
252 .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
253 .quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
254 .quoteblock.abstract{margin:0 1em 1.25em;display:block}
255 .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
256 .quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
257 .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
258 .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
259 .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
260 p.tableblock:last-child{margin-bottom:0}
261 td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
262 td.tableblock>.content>:last-child{margin-bottom:-1.25em}
263 table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
264 table.grid-all>*>tr>*{border-width:1px}
265 table.grid-cols>*>tr>*{border-width:0 1px}
266 table.grid-rows>*>tr>*{border-width:1px 0}
267 table.frame-all{border-width:1px}
268 table.frame-ends{border-width:1px 0}
269 table.frame-sides{border-width:0 1px}
270 table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
271 table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
272 table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
273 table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
274 table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
275 th.halign-left,td.halign-left{text-align:left}
276 th.halign-right,td.halign-right{text-align:right}
277 th.halign-center,td.halign-center{text-align:center}
278 th.valign-top,td.valign-top{vertical-align:top}
279 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280 th.valign-middle,td.valign-middle{vertical-align:middle}
281 table thead th,table tfoot th{font-weight:bold}
282 tbody tr th{background:#f7f8f7}
283 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
284 p.tableblock>code:only-child{background:none;padding:0}
285 p.tableblock{font-size:1em}
286 ol{margin-left:1.75em}
287 ul li ol{margin-left:1.5em}
288 dl dd{margin-left:1.125em}
289 dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
290 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
291 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
293 ul.unstyled,ol.unstyled{margin-left:0}
294 li>p:empty:only-child::before{content:"";display:inline-block}
295 ul.checklist>li>p:first-child{margin-left:-1em}
296 ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
297 ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
298 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
299 ul.inline>li{margin-left:1.25em}
300 .unstyled dl dt{font-weight:400;font-style:normal}
301 ol.arabic{list-style-type:decimal}
302 ol.decimal{list-style-type:decimal-leading-zero}
303 ol.loweralpha{list-style-type:lower-alpha}
304 ol.upperalpha{list-style-type:upper-alpha}
305 ol.lowerroman{list-style-type:lower-roman}
306 ol.upperroman{list-style-type:upper-roman}
307 ol.lowergreek{list-style-type:lower-greek}
308 .hdlist>table,.colist>table{border:0;background:none}
309 .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
310 td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
311 td.hdlist1{font-weight:bold;padding-bottom:1.25em}
312 td.hdlist2{word-wrap:anywhere}
313 .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
314 .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
315 .colist td:not([class]):first-child img{max-width:none}
316 .colist td:not([class]):last-child{padding:.25em 0}
317 .thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
318 .imageblock.left{margin:.25em .625em 1.25em 0}
319 .imageblock.right{margin:.25em 0 1.25em .625em}
320 .imageblock>.title{margin-bottom:0}
321 .imageblock.thumb,.imageblock.th{border-width:6px}
322 .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
323 .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
324 .image.left{margin-right:.625em}
325 .image.right{margin-left:.625em}
326 a.image{text-decoration:none;display:inline-block}
327 a.image object{pointer-events:none}
328 sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
329 sup.footnote a,sup.footnoteref a{text-decoration:none}
330 sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
331 #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
332 #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
333 #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
334 #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
335 #footnotes .footnote:last-of-type{margin-bottom:0}
336 #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
337 div.unbreakable{page-break-inside:avoid}
338 .big{font-size:larger}
339 .small{font-size:smaller}
340 .underline{text-decoration:underline}
341 .overline{text-decoration:overline}
342 .line-through{text-decoration:line-through}
343 .aqua{color:#00bfbf}
344 .aqua-background{background:#00fafa}
345 .black{color:#000}
346 .black-background{background:#000}
347 .blue{color:#0000bf}
348 .blue-background{background:#0000fa}
349 .fuchsia{color:#bf00bf}
350 .fuchsia-background{background:#fa00fa}
351 .gray{color:#606060}
352 .gray-background{background:#7d7d7d}
353 .green{color:#006000}
354 .green-background{background:#007d00}
355 .lime{color:#00bf00}
356 .lime-background{background:#00fa00}
357 .maroon{color:#600000}
358 .maroon-background{background:#7d0000}
359 .navy{color:#000060}
360 .navy-background{background:#00007d}
361 .olive{color:#606000}
362 .olive-background{background:#7d7d00}
363 .purple{color:#600060}
364 .purple-background{background:#7d007d}
365 .red{color:#bf0000}
366 .red-background{background:#fa0000}
367 .silver{color:#909090}
368 .silver-background{background:#bcbcbc}
369 .teal{color:#006060}
370 .teal-background{background:#007d7d}
371 .white{color:#bfbfbf}
372 .white-background{background:#fafafa}
373 .yellow{color:#bfbf00}
374 .yellow-background{background:#fafa00}
375 span.icon>.fa{cursor:default}
376 a span.icon>.fa{cursor:inherit}
377 .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
378 .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
379 .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
380 .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
381 .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
382 .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
383 .conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
384 .conum[data-value] *{color:#fff!important}
385 .conum[data-value]+b{display:none}
386 .conum[data-value]::after{content:attr(data-value)}
387 pre .conum[data-value]{position:relative;top:-.125em}
388 b.conum *{color:inherit!important}
389 .conum:not([data-value]):empty{display:none}
390 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391 h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
392 p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
393 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
394 p{margin-bottom:1.25rem}
395 .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
396 .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
397 .print-only{display:none!important}
398 @page{margin:1.25cm .75cm}
399 @media print{*{box-shadow:none!important;text-shadow:none!important}
400 html{font-size:80%}
401 a{color:inherit!important;text-decoration:underline!important}
402 a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
403 a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
404 abbr[title]{border-bottom:1px dotted}
405 abbr[title]::after{content:" (" attr(title) ")"}
406 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407 thead{display:table-header-group}
408 svg{max-width:100%}
409 p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
410 h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
411 #header,#content,#footnotes,#footer{max-width:none}
412 #toc,.sidebarblock,.exampleblock>.content{background:none!important}
413 #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
414 body.book #header{text-align:center}
415 body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
416 body.book #header .details{border:0!important;display:block;padding:0!important}
417 body.book #header .details span:first-child{margin-left:0!important}
418 body.book #header .details br{display:block}
419 body.book #header .details br+span::before{content:none!important}
420 body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
421 body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
422 .listingblock code[data-lang]::before{display:block}
423 #footer{padding:0 .9375em}
424 .hide-on-print{display:none!important}
425 .print-only{display:block!important}
426 .hide-for-print{display:none!important}
427 .show-for-print{display:inherit!important}}
428 @media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
429 .sect1{padding:0!important}
430 .sect1+.sect1{border:0}
431 #footer{background:none}
432 #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
433 @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
434 </style>
435 <style>
436 pre>code {
437 display: inline;
439 </style>
440 </head>
441 <body class="manpage">
442 <div id="header">
443 <h1>gitweb(1) Manual Page</h1>
444 <h2 id="_name">NAME</h2>
445 <div class="sectionbody">
446 <p>gitweb - Git web interface (web frontend to Git repositories)</p>
447 </div>
448 </div>
449 <div id="content">
450 <div class="sect1">
451 <h2 id="_synopsis">SYNOPSIS</h2>
452 <div class="sectionbody">
453 <div class="paragraph">
454 <p>To get started with gitweb, run <a href="git-instaweb.html">git-instaweb(1)</a> from a Git repository.
455 This will configure and start your web server, and run a web browser pointing to
456 gitweb.</p>
457 </div>
458 </div>
459 </div>
460 <div class="sect1">
461 <h2 id="_description">DESCRIPTION</h2>
462 <div class="sectionbody">
463 <div class="paragraph">
464 <p>Gitweb provides a web interface to Git repositories. Its features include:</p>
465 </div>
466 <div class="ulist">
467 <ul>
468 <li>
469 <p>Viewing multiple Git repositories with common root.</p>
470 </li>
471 <li>
472 <p>Browsing every revision of the repository.</p>
473 </li>
474 <li>
475 <p>Viewing the contents of files in the repository at any revision.</p>
476 </li>
477 <li>
478 <p>Viewing the revision log of branches, history of files and directories,
479 seeing what was changed, when, and by whom.</p>
480 </li>
481 <li>
482 <p>Viewing the blame/annotation details of any file (if enabled).</p>
483 </li>
484 <li>
485 <p>Generating RSS and Atom feeds of commits, for any branch.
486 The feeds are auto-discoverable in modern web browsers.</p>
487 </li>
488 <li>
489 <p>Viewing everything that was changed in a revision, and stepping through
490 revisions one at a time, viewing the history of the repository.</p>
491 </li>
492 <li>
493 <p>Finding commits whose commit messages match a given search term.</p>
494 </li>
495 </ul>
496 </div>
497 <div class="paragraph">
498 <p>See <a href="https://repo.or.cz/w/git.git/tree/HEAD:/gitweb/" class="bare">https://repo.or.cz/w/git.git/tree/HEAD:/gitweb/</a> for gitweb source code,
499 browsed using gitweb itself.</p>
500 </div>
501 </div>
502 </div>
503 <div class="sect1">
504 <h2 id="_configuration">CONFIGURATION</h2>
505 <div class="sectionbody">
506 <div class="paragraph">
507 <p>Various aspects of gitweb&#8217;s behavior can be controlled through the configuration
508 file <code>gitweb_config.perl</code> or <code>/etc/gitweb.conf</code>. See the <a href="gitweb.conf.html">gitweb.conf(5)</a>
509 for details.</p>
510 </div>
511 <div class="sect2">
512 <h3 id="_repositories">Repositories</h3>
513 <div class="paragraph">
514 <p>Gitweb can show information from one or more Git repositories. These
515 repositories have to be all on local filesystem, and have to share a common
516 repository root, i.e. be all under a single parent repository (but see also
517 the "Advanced web server setup" section, "Webserver configuration with multiple
518 projects' root" subsection).</p>
519 </div>
520 <div class="listingblock">
521 <div class="content">
522 <pre>our $projectroot = '/path/to/parent/directory';</pre>
523 </div>
524 </div>
525 <div class="paragraph">
526 <p>The default value for <code>$projectroot</code> is <code>/pub/git</code>. You can change it during
527 building gitweb via the <code>GITWEB_PROJECTROOT</code> build configuration variable.</p>
528 </div>
529 <div class="paragraph">
530 <p>By default all Git repositories under <code>$projectroot</code> are visible and available
531 to gitweb. The list of projects is generated by default by scanning the
532 <code>$projectroot</code> directory for Git repositories (for object databases to be
533 more exact; gitweb is not interested in a working area, and is best suited
534 to showing "bare" repositories).</p>
535 </div>
536 <div class="paragraph">
537 <p>The name of the repository in gitweb is the path to its <code>$GIT_DIR</code> (its object
538 database) relative to <code>$projectroot</code>. Therefore the repository $repo can be
539 found at "$projectroot/$repo".</p>
540 </div>
541 </div>
542 <div class="sect2">
543 <h3 id="_projects_list_file_format">Projects list file format</h3>
544 <div class="paragraph">
545 <p>Instead of having gitweb find repositories by scanning the filesystem
546 starting from $projectroot, you can provide a pre-generated list of
547 visible projects by setting <code>$projects_list</code> to point to a plain text
548 file with a list of projects (with some additional info).</p>
549 </div>
550 <div class="paragraph">
551 <p>This file uses the following format:</p>
552 </div>
553 <div class="ulist">
554 <ul>
555 <li>
556 <p>One record (for project / repository) per line; does not support line
557 continuation (newline escaping).</p>
558 </li>
559 <li>
560 <p>Leading and trailing whitespace are ignored.</p>
561 </li>
562 <li>
563 <p>Whitespace separated fields; any run of whitespace can be used as field
564 separator (rules for Perl&#8217;s "<code>split</code>(" ", <code>$line</code>)").</p>
565 </li>
566 <li>
567 <p>Fields use modified URI encoding, defined in RFC 3986, section 2.1
568 (Percent-Encoding), or rather "Query string encoding" (see
569 <a href="https://en.wikipedia.org/wiki/Query_string#URL_encoding" class="bare">https://en.wikipedia.org/wiki/Query_string#URL_encoding</a>), the difference
570 being that SP (" ") can be encoded as "&#43;" (and therefore "&#43;" has to be
571 also percent-encoded).</p>
572 <div class="paragraph">
573 <p>Reserved characters are: "%" (used for encoding), "&#43;" (can be used to
574 encode SPACE), all whitespace characters as defined in Perl, including SP,
575 TAB and LF, (used to separate fields in a record).</p>
576 </div>
577 </li>
578 <li>
579 <p>Currently recognized fields are:</p>
580 <div class="dlist">
581 <dl>
582 <dt class="hdlist1">&lt;repository path&gt;</dt>
583 <dd>
584 <p>path to repository GIT_DIR, relative to <code>$projectroot</code></p>
585 </dd>
586 <dt class="hdlist1">&lt;repository owner&gt;</dt>
587 <dd>
588 <p>displayed as repository owner, preferably full name, or email,
589 or both</p>
590 </dd>
591 </dl>
592 </div>
593 </li>
594 </ul>
595 </div>
596 <div class="paragraph">
597 <p>You can generate the projects list index file using the project_index action
598 (the <em>TXT</em> link on projects list page) directly from gitweb; see also
599 "Generating projects list using gitweb" section below.</p>
600 </div>
601 <div class="paragraph">
602 <p>Example contents:</p>
603 </div>
604 <div class="listingblock">
605 <div class="content">
606 <pre>foo.git Joe+R+Hacker+&lt;joe@example.com&gt;
607 foo/bar.git O+W+Ner+&lt;owner@example.org&gt;</pre>
608 </div>
609 </div>
610 <div class="paragraph">
611 <p>By default this file controls only which projects are <strong>visible</strong> on projects
612 list page (note that entries that do not point to correctly recognized Git
613 repositories won&#8217;t be displayed by gitweb). Even if a project is not
614 visible on projects list page, you can view it nevertheless by hand-crafting
615 a gitweb URL. By setting <code>$strict_export</code> configuration variable (see
616 <a href="gitweb.conf.html">gitweb.conf(5)</a>) to true value you can allow viewing only of
617 repositories also shown on the overview page (i.e. only projects explicitly
618 listed in projects list file will be accessible).</p>
619 </div>
620 </div>
621 <div class="sect2">
622 <h3 id="_generating_projects_list_using_gitweb">Generating projects list using gitweb</h3>
623 <div class="paragraph">
624 <p>We assume that GITWEB_CONFIG has its default Makefile value, namely
625 <em>gitweb_config.perl</em>. Put the following in <em>gitweb_make_index.perl</em> file:</p>
626 </div>
627 <div class="listingblock">
628 <div class="content">
629 <pre>read_config_file("gitweb_config.perl");
630 $projects_list = $projectroot;</pre>
631 </div>
632 </div>
633 <div class="paragraph">
634 <p>Then create the following script to get list of project in the format
635 suitable for GITWEB_LIST build configuration variable (or
636 <code>$projects_list</code> variable in gitweb config):</p>
637 </div>
638 <div class="listingblock">
639 <div class="content">
640 <pre>#!/bin/sh
642 export GITWEB_CONFIG="gitweb_make_index.perl"
643 export GATEWAY_INTERFACE="CGI/1.1"
644 export HTTP_ACCEPT="*/*"
645 export REQUEST_METHOD="GET"
646 export QUERY_STRING="a=project_index"
648 perl -- /var/www/cgi-bin/gitweb.cgi</pre>
649 </div>
650 </div>
651 <div class="paragraph">
652 <p>Run this script and save its output to a file. This file could then be used
653 as projects list file, which means that you can set <code>$projects_list</code> to its
654 filename.</p>
655 </div>
656 </div>
657 <div class="sect2">
658 <h3 id="_controlling_access_to_git_repositories">Controlling access to Git repositories</h3>
659 <div class="paragraph">
660 <p>By default all Git repositories under <code>$projectroot</code> are visible and
661 available to gitweb. You can however configure how gitweb controls access
662 to repositories.</p>
663 </div>
664 <div class="ulist">
665 <ul>
666 <li>
667 <p>As described in "Projects list file format" section, you can control which
668 projects are <strong>visible</strong> by selectively including repositories in projects
669 list file, and setting <code>$projects_list</code> gitweb configuration variable to
670 point to it. With <code>$strict_export</code> set, projects list file can be used to
671 control which repositories are <strong>available</strong> as well.</p>
672 </li>
673 <li>
674 <p>You can configure gitweb to only list and allow viewing of the explicitly
675 exported repositories, via <code>$export_ok</code> variable in gitweb config file; see
676 <a href="gitweb.conf.html">gitweb.conf(5)</a> manpage. If it evaluates to true, gitweb shows
677 repositories only if this file named by <code>$export_ok</code> exists in its object
678 database (if directory has the magic file named <code>$export_ok</code>).</p>
679 <div class="paragraph">
680 <p>For example <a href="git-daemon.html">git-daemon(1)</a> by default (unless <code>--export-all</code> option
681 is used) allows pulling only for those repositories that have
682 <em>git-daemon-export-ok</em> file. Adding</p>
683 </div>
684 <div class="listingblock">
685 <div class="content">
686 <pre>our $export_ok = "git-daemon-export-ok";</pre>
687 </div>
688 </div>
689 <div class="paragraph">
690 <p>makes gitweb show and allow access only to those repositories that can be
691 fetched from via <code>git://</code> protocol.</p>
692 </div>
693 </li>
694 <li>
695 <p>Finally, it is possible to specify an arbitrary perl subroutine that will
696 be called for each repository to determine if it can be exported. The
697 subroutine receives an absolute path to the project (repository) as its only
698 parameter (i.e. "$projectroot/$project").</p>
699 <div class="paragraph">
700 <p>For example, if you use mod_perl to run the script, and have dumb
701 HTTP protocol authentication configured for your repositories, you
702 can use the following hook to allow access only if the user is
703 authorized to read the files:</p>
704 </div>
705 <div class="listingblock">
706 <div class="content">
707 <pre>$export_auth_hook = sub {
708 use Apache2::SubRequest ();
709 use Apache2::Const -compile =&gt; qw(HTTP_OK);
710 my $path = "$_[0]/HEAD";
711 my $r = Apache2::RequestUtil-&gt;request;
712 my $sub = $r-&gt;lookup_file($path);
713 return $sub-&gt;filename eq $path
714 &amp;&amp; $sub-&gt;status == Apache2::Const::HTTP_OK;
715 };</pre>
716 </div>
717 </div>
718 </li>
719 </ul>
720 </div>
721 </div>
722 <div class="sect2">
723 <h3 id="_per_repository_gitweb_configuration">Per-repository gitweb configuration</h3>
724 <div class="paragraph">
725 <p>You can configure individual repositories shown in gitweb by creating file
726 in the <code>GIT_DIR</code> of Git repository, or by setting some repo configuration
727 variable (in <code>GIT_DIR/config</code>, see <a href="git-config.html">git-config(1)</a>).</p>
728 </div>
729 <div class="paragraph">
730 <p>You can use the following files in repository:</p>
731 </div>
732 <div class="dlist">
733 <dl>
734 <dt class="hdlist1">README.html</dt>
735 <dd>
736 <p>A html file (HTML fragment) which is included on the gitweb project
737 "summary" page inside <em>&lt;div&gt;</em> block element. You can use it for longer
738 description of a project, to provide links (for example to project&#8217;s
739 homepage), etc. This is recognized only if XSS prevention is off
740 (<code>$prevent_xss</code> is false, see <a href="gitweb.conf.html">gitweb.conf(5)</a>); a way to include
741 a README safely when XSS prevention is on may be worked out in the
742 future.</p>
743 </dd>
744 <dt class="hdlist1">description (or <code>gitweb.description</code>)</dt>
745 <dd>
746 <p>Short (shortened to <code>$projects_list_description_width</code> in the projects
747 list page, which is 25 characters by default; see
748 <a href="gitweb.conf.html">gitweb.conf(5)</a>) single line description of a project (of a
749 repository). Plain text file; HTML will be escaped. By default set to</p>
750 <div class="listingblock">
751 <div class="content">
752 <pre>Unnamed repository; edit this file to name it for gitweb.</pre>
753 </div>
754 </div>
755 <div class="paragraph">
756 <p>from the template during repository creation, usually installed in
757 <code>/usr/share/git-core/templates/</code>. You can use the <code>gitweb.description</code> repo
758 configuration variable, but the file takes precedence.</p>
759 </div>
760 </dd>
761 <dt class="hdlist1">category (or <code>gitweb.category</code>)</dt>
762 <dd>
763 <p>Single line category of a project, used to group projects if
764 <code>$projects_list_group_categories</code> is enabled. By default (file and
765 configuration variable absent), uncategorized projects are put in the
766 <code>$project_list_default_category</code> category. You can use the
767 <code>gitweb.category</code> repo configuration variable, but the file takes
768 precedence.</p>
769 <div class="paragraph">
770 <p>The configuration variables <code>$projects_list_group_categories</code> and
771 <code>$project_list_default_category</code> are described in <a href="gitweb.conf.html">gitweb.conf(5)</a></p>
772 </div>
773 </dd>
774 <dt class="hdlist1">cloneurl (or multiple-valued <code>gitweb.url</code>)</dt>
775 <dd>
776 <p>File with repository URL (used for clone and fetch), one per line.
777 Displayed in the project summary page. You can use multiple-valued
778 <code>gitweb.url</code> repository configuration variable for that, but the file
779 takes precedence.</p>
780 <div class="paragraph">
781 <p>This is per-repository enhancement / version of global prefix-based
782 <code>@git_base_url_list</code> gitweb configuration variable (see
783 <a href="gitweb.conf.html">gitweb.conf(5)</a>).</p>
784 </div>
785 </dd>
786 <dt class="hdlist1">gitweb.owner</dt>
787 <dd>
788 <p>You can use the <code>gitweb.owner</code> repository configuration variable to set
789 repository&#8217;s owner. It is displayed in the project list and summary
790 page.</p>
791 <div class="paragraph">
792 <p>If it&#8217;s not set, filesystem directory&#8217;s owner is used (via GECOS field,
793 i.e. real name field from <strong>getpwuid</strong>(3)) if <code>$projects_list</code> is unset
794 (gitweb scans <code>$projectroot</code> for repositories); if <code>$projects_list</code>
795 points to file with list of repositories, then project owner defaults to
796 value from this file for given repository.</p>
797 </div>
798 </dd>
799 <dt class="hdlist1">various <code>gitweb.</code>* config variables (in config)</dt>
800 <dd>
801 <p>Read description of %feature hash for detailed list, and descriptions.
802 See also "Configuring gitweb features" section in <a href="gitweb.conf.html">gitweb.conf(5)</a></p>
803 </dd>
804 </dl>
805 </div>
806 </div>
807 </div>
808 </div>
809 <div class="sect1">
810 <h2 id="_actions_and_urls">ACTIONS, AND URLS</h2>
811 <div class="sectionbody">
812 <div class="paragraph">
813 <p>Gitweb can use path_info (component) based URLs, or it can pass all necessary
814 information via query parameters. The typical gitweb URLs are broken down in to
815 five components:</p>
816 </div>
817 <div class="listingblock">
818 <div class="content">
819 <pre>.../gitweb.cgi/&lt;repo&gt;/&lt;action&gt;/&lt;revision&gt;:/&lt;path&gt;?&lt;arguments&gt;</pre>
820 </div>
821 </div>
822 <div class="dlist">
823 <dl>
824 <dt class="hdlist1">repo</dt>
825 <dd>
826 <p>The repository the action will be performed on.</p>
827 <div class="paragraph">
828 <p>All actions except for those that list all available projects,
829 in whatever form, require this parameter.</p>
830 </div>
831 </dd>
832 <dt class="hdlist1">action</dt>
833 <dd>
834 <p>The action that will be run. Defaults to <em>projects_list</em> if repo
835 is not set, and to <em>summary</em> otherwise.</p>
836 </dd>
837 <dt class="hdlist1">revision</dt>
838 <dd>
839 <p>Revision shown. Defaults to HEAD.</p>
840 </dd>
841 <dt class="hdlist1">path</dt>
842 <dd>
843 <p>The path within the &lt;repository&gt; that the action is performed on,
844 for those actions that require it.</p>
845 </dd>
846 <dt class="hdlist1">arguments</dt>
847 <dd>
848 <p>Any arguments that control the behaviour of the action.</p>
849 </dd>
850 </dl>
851 </div>
852 <div class="paragraph">
853 <p>Some actions require or allow to specify two revisions, and sometimes even two
854 pathnames. In most general form such path_info (component) based gitweb URL
855 looks like this:</p>
856 </div>
857 <div class="listingblock">
858 <div class="content">
859 <pre>.../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;</pre>
860 </div>
861 </div>
862 <div class="paragraph">
863 <p>Each action is implemented as a subroutine, and must be present in %actions
864 hash. Some actions are disabled by default, and must be turned on via feature
865 mechanism. For example to enable <em>blame</em> view add the following to gitweb
866 configuration file:</p>
867 </div>
868 <div class="listingblock">
869 <div class="content">
870 <pre>$feature{'blame'}{'default'} = [1];</pre>
871 </div>
872 </div>
873 <div class="sect2">
874 <h3 id="_actions">Actions:</h3>
875 <div class="paragraph">
876 <p>The standard actions are:</p>
877 </div>
878 <div class="dlist">
879 <dl>
880 <dt class="hdlist1">project_list</dt>
881 <dd>
882 <p>Lists the available Git repositories. This is the default command if no
883 repository is specified in the URL.</p>
884 </dd>
885 <dt class="hdlist1">summary</dt>
886 <dd>
887 <p>Displays summary about given repository. This is the default command if
888 no action is specified in URL, and only repository is specified.</p>
889 </dd>
890 <dt class="hdlist1">heads</dt>
891 <dt class="hdlist1">remotes</dt>
892 <dd>
893 <p>Lists all local or all remote-tracking branches in given repository.</p>
894 <div class="paragraph">
895 <p>The latter is not available by default, unless configured.</p>
896 </div>
897 </dd>
898 <dt class="hdlist1">tags</dt>
899 <dd>
900 <p>List all tags (lightweight and annotated) in given repository.</p>
901 </dd>
902 <dt class="hdlist1">blob</dt>
903 <dt class="hdlist1">tree</dt>
904 <dd>
905 <p>Shows the files and directories in a given repository path, at given
906 revision. This is default command if no action is specified in the URL,
907 and path is given.</p>
908 </dd>
909 <dt class="hdlist1">blob_plain</dt>
910 <dd>
911 <p>Returns the raw data for the file in given repository, at given path and
912 revision. Links to this action are marked <em>raw</em>.</p>
913 </dd>
914 <dt class="hdlist1">blobdiff</dt>
915 <dd>
916 <p>Shows the difference between two revisions of the same file.</p>
917 </dd>
918 <dt class="hdlist1">blame</dt>
919 <dt class="hdlist1">blame_incremental</dt>
920 <dd>
921 <p>Shows the blame (also called annotation) information for a file. On a
922 per line basis it shows the revision in which that line was last changed
923 and the user that committed the change. The incremental version (which
924 if configured is used automatically when JavaScript is enabled) uses
925 Ajax to incrementally add blame info to the contents of given file.</p>
926 <div class="paragraph">
927 <p>This action is disabled by default for performance reasons.</p>
928 </div>
929 </dd>
930 <dt class="hdlist1">commit</dt>
931 <dt class="hdlist1">commitdiff</dt>
932 <dd>
933 <p>Shows information about a specific commit in a repository. The <em>commit</em>
934 view shows information about commit in more detail, the <em>commitdiff</em>
935 action shows changeset for given commit.</p>
936 </dd>
937 <dt class="hdlist1">patch</dt>
938 <dd>
939 <p>Returns the commit in plain text mail format, suitable for applying with
940 <a href="git-am.html">git-am(1)</a>.</p>
941 </dd>
942 <dt class="hdlist1">tag</dt>
943 <dd>
944 <p>Display specific annotated tag (tag object).</p>
945 </dd>
946 <dt class="hdlist1">log</dt>
947 <dt class="hdlist1">shortlog</dt>
948 <dd>
949 <p>Shows log information (commit message or just commit subject) for a
950 given branch (starting from given revision).</p>
951 <div class="paragraph">
952 <p>The <em>shortlog</em> view is more compact; it shows one commit per line.</p>
953 </div>
954 </dd>
955 <dt class="hdlist1">history</dt>
956 <dd>
957 <p>Shows history of the file or directory in a given repository path,
958 starting from given revision (defaults to HEAD, i.e. default branch).</p>
959 <div class="paragraph">
960 <p>This view is similar to <em>shortlog</em> view.</p>
961 </div>
962 </dd>
963 <dt class="hdlist1">rss</dt>
964 <dt class="hdlist1">atom</dt>
965 <dd>
966 <p>Generates an RSS (or Atom) feed of changes to repository.</p>
967 </dd>
968 </dl>
969 </div>
970 </div>
971 </div>
972 </div>
973 <div class="sect1">
974 <h2 id="_webserver_configuration">WEBSERVER CONFIGURATION</h2>
975 <div class="sectionbody">
976 <div class="paragraph">
977 <p>This section explains how to configure some common webservers to run gitweb. In
978 all cases, <code>/path/to/gitweb</code> in the examples is the directory you ran installed
979 gitweb in, and contains <code>gitweb_config.perl</code>.</p>
980 </div>
981 <div class="paragraph">
982 <p>If you&#8217;ve configured a web server that isn&#8217;t listed here for gitweb, please send
983 in the instructions so they can be included in a future release.</p>
984 </div>
985 <div class="sect2">
986 <h3 id="_apache_as_cgi">Apache as CGI</h3>
987 <div class="paragraph">
988 <p>Apache must be configured to support CGI scripts in the directory in
989 which gitweb is installed. Let&#8217;s assume that it is <code>/var/www/cgi-bin</code>
990 directory.</p>
991 </div>
992 <div class="listingblock">
993 <div class="content">
994 <pre>ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
996 &lt;Directory "/var/www/cgi-bin"&gt;
997 Options Indexes FollowSymlinks ExecCGI
998 AllowOverride None
999 Order allow,deny
1000 Allow from all
1001 &lt;/Directory&gt;</pre>
1002 </div>
1003 </div>
1004 <div class="paragraph">
1005 <p>With that configuration the full path to browse repositories would be:</p>
1006 </div>
1007 <div class="literalblock">
1008 <div class="content">
1009 <pre>http://server/cgi-bin/gitweb.cgi</pre>
1010 </div>
1011 </div>
1012 </div>
1013 <div class="sect2">
1014 <h3 id="_apache_with_mod_perl_via_modperlregistry">Apache with mod_perl, via ModPerl::Registry</h3>
1015 <div class="paragraph">
1016 <p>You can use mod_perl with gitweb. You must install Apache::Registry
1017 (for mod_perl 1.x) or ModPerl::Registry (for mod_perl 2.x) to enable
1018 this support.</p>
1019 </div>
1020 <div class="paragraph">
1021 <p>Assuming that gitweb is installed to <code>/var/www/perl</code>, the following
1022 Apache configuration (for mod_perl 2.x) is suitable.</p>
1023 </div>
1024 <div class="listingblock">
1025 <div class="content">
1026 <pre>Alias /perl "/var/www/perl"
1028 &lt;Directory "/var/www/perl"&gt;
1029 SetHandler perl-script
1030 PerlResponseHandler ModPerl::Registry
1031 PerlOptions +ParseHeaders
1032 Options Indexes FollowSymlinks +ExecCGI
1033 AllowOverride None
1034 Order allow,deny
1035 Allow from all
1036 &lt;/Directory&gt;</pre>
1037 </div>
1038 </div>
1039 <div class="paragraph">
1040 <p>With that configuration the full path to browse repositories would be:</p>
1041 </div>
1042 <div class="literalblock">
1043 <div class="content">
1044 <pre>http://server/perl/gitweb.cgi</pre>
1045 </div>
1046 </div>
1047 </div>
1048 <div class="sect2">
1049 <h3 id="_apache_with_fastcgi">Apache with FastCGI</h3>
1050 <div class="paragraph">
1051 <p>Gitweb works with Apache and FastCGI. First you need to rename, copy
1052 or symlink gitweb.cgi to gitweb.fcgi. Let&#8217;s assume that gitweb is
1053 installed in <code>/usr/share/gitweb</code> directory. The following Apache
1054 configuration is suitable (UNTESTED!)</p>
1055 </div>
1056 <div class="listingblock">
1057 <div class="content">
1058 <pre>FastCgiServer /usr/share/gitweb/gitweb.cgi
1059 ScriptAlias /gitweb /usr/share/gitweb/gitweb.cgi
1061 Alias /gitweb/static /usr/share/gitweb/static
1062 &lt;Directory /usr/share/gitweb/static&gt;
1063 SetHandler default-handler
1064 &lt;/Directory&gt;</pre>
1065 </div>
1066 </div>
1067 <div class="paragraph">
1068 <p>With that configuration the full path to browse repositories would be:</p>
1069 </div>
1070 <div class="literalblock">
1071 <div class="content">
1072 <pre>http://server/gitweb</pre>
1073 </div>
1074 </div>
1075 </div>
1076 </div>
1077 </div>
1078 <div class="sect1">
1079 <h2 id="_advanced_web_server_setup">ADVANCED WEB SERVER SETUP</h2>
1080 <div class="sectionbody">
1081 <div class="paragraph">
1082 <p>All of those examples use request rewriting, and need <code>mod_rewrite</code>
1083 (or equivalent; examples below are written for Apache).</p>
1084 </div>
1085 <div class="sect2">
1086 <h3 id="_single_url_for_gitweb_and_for_fetching">Single URL for gitweb and for fetching</h3>
1087 <div class="paragraph">
1088 <p>If you want to have one URL for both gitweb and your <code>http://</code>
1089 repositories, you can configure Apache like this:</p>
1090 </div>
1091 <div class="listingblock">
1092 <div class="content">
1093 <pre>&lt;VirtualHost *:80&gt;
1094 ServerName git.example.org
1095 DocumentRoot /pub/git
1096 SetEnv GITWEB_CONFIG /etc/gitweb.conf
1098 # turning on mod rewrite
1099 RewriteEngine on
1101 # make the front page an internal rewrite to the gitweb script
1102 RewriteRule ^/$ /cgi-bin/gitweb.cgi
1104 # make access for "dumb clients" work
1105 RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \
1106 /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
1107 &lt;/VirtualHost&gt;</pre>
1108 </div>
1109 </div>
1110 <div class="paragraph">
1111 <p>The above configuration expects your public repositories to live under
1112 <code>/pub/git</code> and will serve them as <code>http://git.domain.org/dir-under-pub-git</code>,
1113 both as clonable Git URL and as browsable gitweb interface. If you then
1114 start your <a href="git-daemon.html">git-daemon(1)</a> with <code>--base-path=/pub/git</code> <code>--export-all</code>
1115 then you can even use the <code>git://</code> URL with exactly the same path.</p>
1116 </div>
1117 <div class="paragraph">
1118 <p>Setting the environment variable <code>GITWEB_CONFIG</code> will tell gitweb to use the
1119 named file (i.e. in this example <code>/etc/gitweb.conf</code>) as a configuration for
1120 gitweb. You don&#8217;t really need it in above example; it is required only if
1121 your configuration file is in different place than built-in (during
1122 compiling gitweb) <em>gitweb_config.perl</em> or <code>/etc/gitweb.conf</code>. See
1123 <a href="gitweb.conf.html">gitweb.conf(5)</a> for details, especially information about precedence
1124 rules.</p>
1125 </div>
1126 <div class="paragraph">
1127 <p>If you use the rewrite rules from the example you <strong>might</strong> also need
1128 something like the following in your gitweb configuration file
1129 (<code>/etc/gitweb.conf</code> following example):</p>
1130 </div>
1131 <div class="listingblock">
1132 <div class="content">
1133 <pre>@stylesheets = ("/some/absolute/path/gitweb.css");
1134 $my_uri = "/";
1135 $home_link = "/";
1136 $per_request_config = 1;</pre>
1137 </div>
1138 </div>
1139 <div class="paragraph">
1140 <p>Nowadays though gitweb should create HTML base tag when needed (to set base
1141 URI for relative links), so it should work automatically.</p>
1142 </div>
1143 </div>
1144 <div class="sect2">
1145 <h3 id="_webserver_configuration_with_multiple_projects_root">Webserver configuration with multiple projects' root</h3>
1146 <div class="paragraph">
1147 <p>If you want to use gitweb with several project roots you can edit your
1148 Apache virtual host and gitweb configuration files in the following way.</p>
1149 </div>
1150 <div class="paragraph">
1151 <p>The virtual host configuration (in Apache configuration file) should look
1152 like this:</p>
1153 </div>
1154 <div class="listingblock">
1155 <div class="content">
1156 <pre>&lt;VirtualHost *:80&gt;
1157 ServerName git.example.org
1158 DocumentRoot /pub/git
1159 SetEnv GITWEB_CONFIG /etc/gitweb.conf
1161 # turning on mod rewrite
1162 RewriteEngine on
1164 # make the front page an internal rewrite to the gitweb script
1165 RewriteRule ^/$ /cgi-bin/gitweb.cgi [QSA,L,PT]
1167 # look for a public_git directory in unix users' home
1168 # http://git.example.org/~&lt;user&gt;/
1169 RewriteRule ^/\~([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1170 [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
1172 # http://git.example.org/+&lt;user&gt;/
1173 #RewriteRule ^/\+([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1174 [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
1176 # http://git.example.org/user/&lt;user&gt;/
1177 #RewriteRule ^/user/([^\/]+)/(gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1178 [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
1180 # defined list of project roots
1181 RewriteRule ^/scm(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1182 [QSA,E=GITWEB_PROJECTROOT:/pub/scm/,L,PT]
1183 RewriteRule ^/var(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1184 [QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
1186 # make access for "dumb clients" work
1187 RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \
1188 /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
1189 &lt;/VirtualHost&gt;</pre>
1190 </div>
1191 </div>
1192 <div class="paragraph">
1193 <p>Here actual project root is passed to gitweb via <code>GITWEB_PROJECT_ROOT</code>
1194 environment variable from a web server, so you need to put the following
1195 line in gitweb configuration file (<code>/etc/gitweb.conf</code> in above example):</p>
1196 </div>
1197 <div class="listingblock">
1198 <div class="content">
1199 <pre>$projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/pub/git";</pre>
1200 </div>
1201 </div>
1202 <div class="paragraph">
1203 <p><strong>Note</strong> that this requires to be set for each request, so either
1204 <code>$per_request_config</code> must be false, or the above must be put in code
1205 referenced by <code>$per_request_config</code>;</p>
1206 </div>
1207 <div class="paragraph">
1208 <p>These configurations enable two things. First, each unix user (<em>&lt;user&gt;</em>) of
1209 the server will be able to browse through gitweb Git repositories found in
1210 <code>~/public_git/</code> with the following url:</p>
1211 </div>
1212 <div class="literalblock">
1213 <div class="content">
1214 <pre>http://git.example.org/~&lt;user&gt;/</pre>
1215 </div>
1216 </div>
1217 <div class="paragraph">
1218 <p>If you do not want this feature on your server just remove the second
1219 rewrite rule.</p>
1220 </div>
1221 <div class="paragraph">
1222 <p>If you already use <code>mod_userdir</code> in your virtual host or you don&#8217;t want to
1223 use the '~' as first character, just comment or remove the second rewrite
1224 rule, and uncomment one of the following according to what you want.</p>
1225 </div>
1226 <div class="paragraph">
1227 <p>Second, repositories found in <code>/pub/scm/</code> and <code>/var/git/</code> will be accessible
1228 through <code>http://git.example.org/scm/</code> and <code>http://git.example.org/var/</code>.
1229 You can add as many project roots as you want by adding rewrite rules like
1230 the third and the fourth.</p>
1231 </div>
1232 </div>
1233 <div class="sect2">
1234 <h3 id="_path_info_usage">PATH_INFO usage</h3>
1235 <div class="paragraph">
1236 <p>If you enable PATH_INFO usage in gitweb by putting</p>
1237 </div>
1238 <div class="listingblock">
1239 <div class="content">
1240 <pre>$feature{'pathinfo'}{'default'} = [1];</pre>
1241 </div>
1242 </div>
1243 <div class="paragraph">
1244 <p>in your gitweb configuration file, it is possible to set up your server so
1245 that it consumes and produces URLs in the form</p>
1246 </div>
1247 <div class="literalblock">
1248 <div class="content">
1249 <pre>http://git.example.com/project.git/shortlog/sometag</pre>
1250 </div>
1251 </div>
1252 <div class="paragraph">
1253 <p>i.e. without <em>gitweb.cgi</em> part, by using a configuration such as the
1254 following. This configuration assumes that <code>/var/www/gitweb</code> is the
1255 DocumentRoot of your webserver, contains the gitweb.cgi script and
1256 complementary static files (stylesheet, favicon, JavaScript):</p>
1257 </div>
1258 <div class="listingblock">
1259 <div class="content">
1260 <pre>&lt;VirtualHost *:80&gt;
1261 ServerAlias git.example.com
1263 DocumentRoot /var/www/gitweb
1265 &lt;Directory /var/www/gitweb&gt;
1266 Options ExecCGI
1267 AddHandler cgi-script cgi
1269 DirectoryIndex gitweb.cgi
1271 RewriteEngine On
1272 RewriteCond %{REQUEST_FILENAME} !-f
1273 RewriteCond %{REQUEST_FILENAME} !-d
1274 RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
1275 &lt;/Directory&gt;
1276 &lt;/VirtualHost&gt;</pre>
1277 </div>
1278 </div>
1279 <div class="paragraph">
1280 <p>The rewrite rule guarantees that existing static files will be properly
1281 served, whereas any other URL will be passed to gitweb as PATH_INFO
1282 parameter.</p>
1283 </div>
1284 <div class="paragraph">
1285 <p><strong>Notice</strong> that in this case you don&#8217;t need special settings for
1286 <code>@stylesheets</code>, <code>$my_uri</code> and <code>$home_link</code>, but you lose "dumb client"
1287 access to your project .git dirs (described in "Single URL for gitweb and
1288 for fetching" section). A possible workaround for the latter is the
1289 following: in your project root dir (e.g. <code>/pub/git</code>) have the projects
1290 named <strong>without</strong> a .git extension (e.g. <code>/pub/git/project</code> instead of
1291 <code>/pub/git/project.git</code>) and configure Apache as follows:</p>
1292 </div>
1293 <div class="listingblock">
1294 <div class="content">
1295 <pre>&lt;VirtualHost *:80&gt;
1296 ServerAlias git.example.com
1298 DocumentRoot /var/www/gitweb
1300 AliasMatch ^(/.*?)(\.git)(/.*)?$ /pub/git$1$3
1301 &lt;Directory /var/www/gitweb&gt;
1302 Options ExecCGI
1303 AddHandler cgi-script cgi
1305 DirectoryIndex gitweb.cgi
1307 RewriteEngine On
1308 RewriteCond %{REQUEST_FILENAME} !-f
1309 RewriteCond %{REQUEST_FILENAME} !-d
1310 RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
1311 &lt;/Directory&gt;
1312 &lt;/VirtualHost&gt;</pre>
1313 </div>
1314 </div>
1315 <div class="paragraph">
1316 <p>The additional AliasMatch makes it so that</p>
1317 </div>
1318 <div class="literalblock">
1319 <div class="content">
1320 <pre>http://git.example.com/project.git</pre>
1321 </div>
1322 </div>
1323 <div class="paragraph">
1324 <p>will give raw access to the project&#8217;s Git dir (so that the project can be
1325 cloned), while</p>
1326 </div>
1327 <div class="literalblock">
1328 <div class="content">
1329 <pre>http://git.example.com/project</pre>
1330 </div>
1331 </div>
1332 <div class="paragraph">
1333 <p>will provide human-friendly gitweb access.</p>
1334 </div>
1335 <div class="paragraph">
1336 <p>This solution is not 100% bulletproof, in the sense that if some project has
1337 a named ref (branch, tag) starting with <code>git/</code>, then paths such as</p>
1338 </div>
1339 <div class="literalblock">
1340 <div class="content">
1341 <pre>http://git.example.com/project/command/abranch..git/abranch</pre>
1342 </div>
1343 </div>
1344 <div class="paragraph">
1345 <p>will fail with a 404 error.</p>
1346 </div>
1347 </div>
1348 </div>
1349 </div>
1350 <div class="sect1">
1351 <h2 id="_bugs">BUGS</h2>
1352 <div class="sectionbody">
1353 <div class="paragraph">
1354 <p>Please report any bugs or feature requests to <a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>,
1355 putting "gitweb" in the subject of email.</p>
1356 </div>
1357 </div>
1358 </div>
1359 <div class="sect1">
1360 <h2 id="_see_also">SEE ALSO</h2>
1361 <div class="sectionbody">
1362 <div class="paragraph">
1363 <p><a href="gitweb.conf.html">gitweb.conf(5)</a>, <a href="git-instaweb.html">git-instaweb(1)</a></p>
1364 </div>
1365 <div class="paragraph">
1366 <p><code>gitweb/README</code>, <code>gitweb/INSTALL</code></p>
1367 </div>
1368 </div>
1369 </div>
1370 <div class="sect1">
1371 <h2 id="_git">GIT</h2>
1372 <div class="sectionbody">
1373 <div class="paragraph">
1374 <p>Part of the <a href="git.html">git(1)</a> suite</p>
1375 </div>
1376 </div>
1377 </div>
1378 </div>
1379 <div id="footer">
1380 <div id="footer-text">
1381 Last updated 2024-10-04 15:34:09 -0700
1382 </div>
1383 </div>
1384 </body>
1385 </html>