blob: 0c942ebe41973597c912592a7d167865d447d9db [file] [log] [blame]
Junio C Hamano11821ed2011-10-19 18:42:091<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamanoc14e6ad2014-10-31 20:25:536<meta name="generator" content="AsciiDoc 8.6.9" />
Junio C Hamano11821ed2011-10-19 18:42:097<title>gitweb(1)</title>
8<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano11821ed2011-10-19 18:42:0924}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
30a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
37
38em {
39 font-style: italic;
40 color: navy;
41}
42
43strong {
44 font-weight: bold;
45 color: #083194;
46}
47
Junio C Hamano11821ed2011-10-19 18:42:0948h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano11821ed2011-10-19 18:42:0950 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
55h1, h2, h3 {
56 border-bottom: 2px solid silver;
57}
58h2 {
59 padding-top: 0.5em;
60}
61h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9d971152012-12-19 00:43:1167h5 {
68 font-size: 1.0em;
69}
Junio C Hamano11821ed2011-10-19 18:42:0970
71div.sectionbody {
Junio C Hamano11821ed2011-10-19 18:42:0972 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
84ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano11821ed2011-10-19 18:42:0989
Junio C Hamanoc14e6ad2014-10-31 20:25:5390.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano11821ed2011-10-19 18:42:0994 padding: 0;
95 margin: 0;
96}
Junio C Hamanoc14e6ad2014-10-31 20:25:5397pre {
98 white-space: pre-wrap;
99}
Junio C Hamano11821ed2011-10-19 18:42:09100
Junio C Hamano9d971152012-12-19 00:43:11101#author {
Junio C Hamano11821ed2011-10-19 18:42:09102 color: #527bbd;
Junio C Hamano11821ed2011-10-19 18:42:09103 font-weight: bold;
104 font-size: 1.1em;
105}
Junio C Hamano9d971152012-12-19 00:43:11106#email {
Junio C Hamano11821ed2011-10-19 18:42:09107}
Junio C Hamano9d971152012-12-19 00:43:11108#revnumber, #revdate, #revremark {
Junio C Hamano11821ed2011-10-19 18:42:09109}
110
Junio C Hamano9d971152012-12-19 00:43:11111#footer {
Junio C Hamano11821ed2011-10-19 18:42:09112 font-size: small;
113 border-top: 2px solid silver;
114 padding-top: 0.5em;
115 margin-top: 4.0em;
116}
Junio C Hamano9d971152012-12-19 00:43:11117#footer-text {
Junio C Hamano11821ed2011-10-19 18:42:09118 float: left;
119 padding-bottom: 0.5em;
120}
Junio C Hamano9d971152012-12-19 00:43:11121#footer-badges {
Junio C Hamano11821ed2011-10-19 18:42:09122 float: right;
123 padding-bottom: 0.5em;
124}
125
Junio C Hamano9d971152012-12-19 00:43:11126#preamble {
Junio C Hamano11821ed2011-10-19 18:42:09127 margin-top: 1.5em;
128 margin-bottom: 1.5em;
129}
Junio C Hamano9d971152012-12-19 00:43:11130div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano11821ed2011-10-19 18:42:09131div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
132div.admonitionblock {
133 margin-top: 1.0em;
134 margin-bottom: 1.5em;
135}
136div.admonitionblock {
137 margin-top: 2.0em;
138 margin-bottom: 2.0em;
139 margin-right: 10%;
140 color: #606060;
141}
142
143div.content { /* Block element content. */
144 padding: 0;
145}
146
147/* Block element titles. */
148div.title, caption.title {
149 color: #527bbd;
Junio C Hamano11821ed2011-10-19 18:42:09150 font-weight: bold;
151 text-align: left;
152 margin-top: 1.0em;
153 margin-bottom: 0.5em;
154}
155div.title + * {
156 margin-top: 0;
157}
158
159td div.title:first-child {
160 margin-top: 0.0em;
161}
162div.content div.title:first-child {
163 margin-top: 0.0em;
164}
165div.content + div.title {
166 margin-top: 0.0em;
167}
168
169div.sidebarblock > div.content {
170 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11171 border: 1px solid #dddddd;
172 border-left: 4px solid #f0f0f0;
Junio C Hamano11821ed2011-10-19 18:42:09173 padding: 0.5em;
174}
175
176div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11177 border: 1px solid #dddddd;
178 border-left: 5px solid #f0f0f0;
179 background: #f8f8f8;
Junio C Hamano11821ed2011-10-19 18:42:09180 padding: 0.5em;
181}
182
183div.quoteblock, div.verseblock {
184 padding-left: 1.0em;
185 margin-left: 1.0em;
186 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11187 border-left: 5px solid #f0f0f0;
188 color: #888;
Junio C Hamano11821ed2011-10-19 18:42:09189}
190
191div.quoteblock > div.attribution {
192 padding-top: 0.5em;
193 text-align: right;
194}
195
Junio C Hamano9d971152012-12-19 00:43:11196div.verseblock > pre.content {
197 font-family: inherit;
198 font-size: inherit;
Junio C Hamano11821ed2011-10-19 18:42:09199}
200div.verseblock > div.attribution {
201 padding-top: 0.75em;
202 text-align: left;
203}
204/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
205div.verseblock + div.attribution {
206 text-align: left;
207}
208
209div.admonitionblock .icon {
210 vertical-align: top;
211 font-size: 1.1em;
212 font-weight: bold;
213 text-decoration: underline;
214 color: #527bbd;
215 padding-right: 0.5em;
216}
217div.admonitionblock td.content {
218 padding-left: 0.5em;
219 border-left: 3px solid #dddddd;
220}
221
222div.exampleblock > div.content {
223 border-left: 3px solid #dddddd;
224 padding-left: 0.5em;
225}
226
227div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc14e6ad2014-10-31 20:25:53228span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamano11821ed2011-10-19 18:42:09229a.image:visited { color: white; }
230
231dl {
232 margin-top: 0.8em;
233 margin-bottom: 0.8em;
234}
235dt {
236 margin-top: 0.5em;
237 margin-bottom: 0;
238 font-style: normal;
239 color: navy;
240}
241dd > *:first-child {
242 margin-top: 0.1em;
243}
244
245ul, ol {
246 list-style-position: outside;
247}
248ol.arabic {
249 list-style-type: decimal;
250}
251ol.loweralpha {
252 list-style-type: lower-alpha;
253}
254ol.upperalpha {
255 list-style-type: upper-alpha;
256}
257ol.lowerroman {
258 list-style-type: lower-roman;
259}
260ol.upperroman {
261 list-style-type: upper-roman;
262}
263
264div.compact ul, div.compact ol,
265div.compact p, div.compact p,
266div.compact div, div.compact div {
267 margin-top: 0.1em;
268 margin-bottom: 0.1em;
269}
270
Junio C Hamano11821ed2011-10-19 18:42:09271tfoot {
272 font-weight: bold;
273}
274td > div.verse {
275 white-space: pre;
276}
Junio C Hamano11821ed2011-10-19 18:42:09277
278div.hdlist {
279 margin-top: 0.8em;
280 margin-bottom: 0.8em;
281}
282div.hdlist tr {
283 padding-bottom: 15px;
284}
285dt.hdlist1.strong, td.hdlist1.strong {
286 font-weight: bold;
287}
288td.hdlist1 {
289 vertical-align: top;
290 font-style: normal;
291 padding-right: 0.8em;
292 color: navy;
293}
294td.hdlist2 {
295 vertical-align: top;
296}
297div.hdlist.compact tr {
298 margin: 0;
299 padding-bottom: 0;
300}
301
302.comment {
303 background: yellow;
304}
305
306.footnote, .footnoteref {
307 font-size: 0.8em;
308}
309
310span.footnote, span.footnoteref {
311 vertical-align: super;
312}
313
314#footnotes {
315 margin: 20px 0 20px 0;
316 padding: 7px 0 0 0;
317}
318
319#footnotes div.footnote {
320 margin: 0 0 5px 0;
321}
322
323#footnotes hr {
324 border: none;
325 border-top: 1px solid silver;
326 height: 1px;
327 text-align: left;
328 margin-left: 0;
329 width: 20%;
330 min-width: 100px;
331}
332
Junio C Hamano9d971152012-12-19 00:43:11333div.colist td {
334 padding-right: 0.5em;
335 padding-bottom: 0.3em;
336 vertical-align: top;
337}
338div.colist td img {
339 margin-top: 0.3em;
Junio C Hamano11821ed2011-10-19 18:42:09340}
341
Junio C Hamano9d971152012-12-19 00:43:11342@media print {
343 #footer-badges { display: none; }
344}
345
346#toc {
Junio C Hamano11821ed2011-10-19 18:42:09347 margin-bottom: 2.5em;
348}
349
Junio C Hamano9d971152012-12-19 00:43:11350#toctitle {
Junio C Hamano11821ed2011-10-19 18:42:09351 color: #527bbd;
Junio C Hamano11821ed2011-10-19 18:42:09352 font-size: 1.1em;
353 font-weight: bold;
354 margin-top: 1.0em;
355 margin-bottom: 0.1em;
356}
357
Junio C Hamanoc14e6ad2014-10-31 20:25:53358div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamano11821ed2011-10-19 18:42:09359 margin-top: 0;
360 margin-bottom: 0;
361}
362div.toclevel2 {
363 margin-left: 2em;
364 font-size: 0.9em;
365}
366div.toclevel3 {
367 margin-left: 4em;
368 font-size: 0.9em;
369}
370div.toclevel4 {
371 margin-left: 6em;
372 font-size: 0.9em;
373}
Junio C Hamano9d971152012-12-19 00:43:11374
375span.aqua { color: aqua; }
376span.black { color: black; }
377span.blue { color: blue; }
378span.fuchsia { color: fuchsia; }
379span.gray { color: gray; }
380span.green { color: green; }
381span.lime { color: lime; }
382span.maroon { color: maroon; }
383span.navy { color: navy; }
384span.olive { color: olive; }
385span.purple { color: purple; }
386span.red { color: red; }
387span.silver { color: silver; }
388span.teal { color: teal; }
389span.white { color: white; }
390span.yellow { color: yellow; }
391
392span.aqua-background { background: aqua; }
393span.black-background { background: black; }
394span.blue-background { background: blue; }
395span.fuchsia-background { background: fuchsia; }
396span.gray-background { background: gray; }
397span.green-background { background: green; }
398span.lime-background { background: lime; }
399span.maroon-background { background: maroon; }
400span.navy-background { background: navy; }
401span.olive-background { background: olive; }
402span.purple-background { background: purple; }
403span.red-background { background: red; }
404span.silver-background { background: silver; }
405span.teal-background { background: teal; }
406span.white-background { background: white; }
407span.yellow-background { background: yellow; }
408
409span.big { font-size: 2em; }
410span.small { font-size: 0.6em; }
411
412span.underline { text-decoration: underline; }
413span.overline { text-decoration: overline; }
414span.line-through { text-decoration: line-through; }
415
Junio C Hamanoc14e6ad2014-10-31 20:25:53416div.unbreakable { page-break-inside: avoid; }
417
Junio C Hamano9d971152012-12-19 00:43:11418
419/*
420 * xhtml11 specific
421 *
422 * */
423
424div.tableblock {
425 margin-top: 1.0em;
426 margin-bottom: 1.5em;
427}
428div.tableblock > table {
429 border: 3px solid #527bbd;
430}
431thead, p.table.header {
432 font-weight: bold;
433 color: #527bbd;
434}
435p.table {
436 margin-top: 0;
437}
438/* Because the table frame attribute is overriden by CSS in most browsers. */
439div.tableblock > table[frame="void"] {
440 border-style: none;
441}
442div.tableblock > table[frame="hsides"] {
443 border-left-style: none;
444 border-right-style: none;
445}
446div.tableblock > table[frame="vsides"] {
447 border-top-style: none;
448 border-bottom-style: none;
449}
450
451
452/*
453 * html5 specific
454 *
455 * */
456
457table.tableblock {
458 margin-top: 1.0em;
459 margin-bottom: 1.5em;
460}
461thead, p.tableblock.header {
462 font-weight: bold;
463 color: #527bbd;
464}
465p.tableblock {
466 margin-top: 0;
467}
468table.tableblock {
469 border-width: 3px;
470 border-spacing: 0px;
471 border-style: solid;
472 border-color: #527bbd;
473 border-collapse: collapse;
474}
475th.tableblock, td.tableblock {
476 border-width: 1px;
477 padding: 4px;
478 border-style: solid;
479 border-color: #527bbd;
480}
481
482table.tableblock.frame-topbot {
483 border-left-style: hidden;
484 border-right-style: hidden;
485}
486table.tableblock.frame-sides {
487 border-top-style: hidden;
488 border-bottom-style: hidden;
489}
490table.tableblock.frame-none {
491 border-style: hidden;
492}
493
494th.tableblock.halign-left, td.tableblock.halign-left {
495 text-align: left;
496}
497th.tableblock.halign-center, td.tableblock.halign-center {
498 text-align: center;
499}
500th.tableblock.halign-right, td.tableblock.halign-right {
501 text-align: right;
502}
503
504th.tableblock.valign-top, td.tableblock.valign-top {
505 vertical-align: top;
506}
507th.tableblock.valign-middle, td.tableblock.valign-middle {
508 vertical-align: middle;
509}
510th.tableblock.valign-bottom, td.tableblock.valign-bottom {
511 vertical-align: bottom;
512}
513
514
515/*
516 * manpage specific
517 *
518 * */
519
520body.manpage h1 {
Junio C Hamano11821ed2011-10-19 18:42:09521 padding-top: 0.5em;
522 padding-bottom: 0.5em;
523 border-top: 2px solid silver;
524 border-bottom: 2px solid silver;
525}
Junio C Hamano9d971152012-12-19 00:43:11526body.manpage h2 {
Junio C Hamano11821ed2011-10-19 18:42:09527 border-style: none;
528}
Junio C Hamano9d971152012-12-19 00:43:11529body.manpage div.sectionbody {
530 margin-left: 3em;
Junio C Hamano11821ed2011-10-19 18:42:09531}
532
533@media print {
Junio C Hamano9d971152012-12-19 00:43:11534 body.manpage div#toc { display: none; }
Junio C Hamano11821ed2011-10-19 18:42:09535}
Junio C Hamanoc14e6ad2014-10-31 20:25:53536
537
Junio C Hamano11821ed2011-10-19 18:42:09538</style>
539<script type="text/javascript">
540/*<![CDATA[*/
Junio C Hamano11821ed2011-10-19 18:42:09541var asciidoc = { // Namespace.
542
543/////////////////////////////////////////////////////////////////////
544// Table Of Contents generator
545/////////////////////////////////////////////////////////////////////
546
547/* Author: Mihai Bazon, September 2002
548 * http://students.infoiasi.ro/~mishoo
549 *
550 * Table Of Content generator
551 * Version: 0.4
552 *
553 * Feel free to use this script under the terms of the GNU General Public
554 * License, as long as you do not remove or alter this notice.
555 */
556
557 /* modified by Troy D. Hanson, September 2006. License: GPL */
558 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
559
560// toclevels = 1..4.
561toc: function (toclevels) {
562
563 function getText(el) {
564 var text = "";
565 for (var i = el.firstChild; i != null; i = i.nextSibling) {
566 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
567 text += i.data;
568 else if (i.firstChild != null)
569 text += getText(i);
570 }
571 return text;
572 }
573
574 function TocEntry(el, text, toclevel) {
575 this.element = el;
576 this.text = text;
577 this.toclevel = toclevel;
578 }
579
580 function tocEntries(el, toclevels) {
581 var result = new Array;
Junio C Hamanoc14e6ad2014-10-31 20:25:53582 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano11821ed2011-10-19 18:42:09583 // Function that scans the DOM tree for header elements (the DOM2
584 // nodeIterator API would be a better technique but not supported by all
585 // browsers).
586 var iterate = function (el) {
587 for (var i = el.firstChild; i != null; i = i.nextSibling) {
588 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
589 var mo = re.exec(i.tagName);
590 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
591 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
592 }
593 iterate(i);
594 }
595 }
596 }
597 iterate(el);
598 return result;
599 }
600
601 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11602 if (!toc) {
603 return;
604 }
605
606 // Delete existing TOC entries in case we're reloading the TOC.
607 var tocEntriesToRemove = [];
608 var i;
609 for (i = 0; i < toc.childNodes.length; i++) {
610 var entry = toc.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53611 if (entry.nodeName.toLowerCase() == 'div'
Junio C Hamano9d971152012-12-19 00:43:11612 && entry.getAttribute("class")
613 && entry.getAttribute("class").match(/^toclevel/))
614 tocEntriesToRemove.push(entry);
615 }
616 for (i = 0; i < tocEntriesToRemove.length; i++) {
617 toc.removeChild(tocEntriesToRemove[i]);
618 }
619
620 // Rebuild TOC entries.
Junio C Hamano11821ed2011-10-19 18:42:09621 var entries = tocEntries(document.getElementById("content"), toclevels);
622 for (var i = 0; i < entries.length; ++i) {
623 var entry = entries[i];
624 if (entry.element.id == "")
625 entry.element.id = "_toc_" + i;
626 var a = document.createElement("a");
627 a.href = "#" + entry.element.id;
628 a.appendChild(document.createTextNode(entry.text));
629 var div = document.createElement("div");
630 div.appendChild(a);
631 div.className = "toclevel" + entry.toclevel;
632 toc.appendChild(div);
633 }
634 if (entries.length == 0)
635 toc.parentNode.removeChild(toc);
636},
637
638
639/////////////////////////////////////////////////////////////////////
640// Footnotes generator
641/////////////////////////////////////////////////////////////////////
642
643/* Based on footnote generation code from:
644 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
645 */
646
647footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11648 // Delete existing footnote entries in case we're reloading the footnodes.
649 var i;
Junio C Hamano11821ed2011-10-19 18:42:09650 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11651 if (!noteholder) {
652 return;
653 }
654 var entriesToRemove = [];
655 for (i = 0; i < noteholder.childNodes.length; i++) {
656 var entry = noteholder.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53657 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9d971152012-12-19 00:43:11658 entriesToRemove.push(entry);
659 }
660 for (i = 0; i < entriesToRemove.length; i++) {
661 noteholder.removeChild(entriesToRemove[i]);
662 }
663
664 // Rebuild footnote entries.
665 var cont = document.getElementById("content");
Junio C Hamano11821ed2011-10-19 18:42:09666 var spans = cont.getElementsByTagName("span");
667 var refs = {};
668 var n = 0;
669 for (i=0; i<spans.length; i++) {
670 if (spans[i].className == "footnote") {
671 n++;
Junio C Hamano9d971152012-12-19 00:43:11672 var note = spans[i].getAttribute("data-note");
673 if (!note) {
674 // Use [\s\S] in place of . so multi-line matches work.
675 // Because JavaScript has no s (dotall) regex flag.
676 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
677 spans[i].innerHTML =
678 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
679 "' title='View footnote' class='footnote'>" + n + "</a>]";
680 spans[i].setAttribute("data-note", note);
681 }
Junio C Hamano11821ed2011-10-19 18:42:09682 noteholder.innerHTML +=
683 "<div class='footnote' id='_footnote_" + n + "'>" +
684 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
685 n + "</a>. " + note + "</div>";
Junio C Hamano11821ed2011-10-19 18:42:09686 var id =spans[i].getAttribute("id");
687 if (id != null) refs["#"+id] = n;
688 }
689 }
690 if (n == 0)
691 noteholder.parentNode.removeChild(noteholder);
692 else {
693 // Process footnoterefs.
694 for (i=0; i<spans.length; i++) {
695 if (spans[i].className == "footnoteref") {
696 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
697 href = href.match(/#.*/)[0]; // Because IE return full URL.
698 n = refs[href];
699 spans[i].innerHTML =
700 "[<a href='#_footnote_" + n +
701 "' title='View footnote' class='footnote'>" + n + "</a>]";
702 }
703 }
704 }
Junio C Hamano9d971152012-12-19 00:43:11705},
706
707install: function(toclevels) {
708 var timerId;
709
710 function reinstall() {
711 asciidoc.footnotes();
712 if (toclevels) {
713 asciidoc.toc(toclevels);
714 }
715 }
716
717 function reinstallAndRemoveTimer() {
718 clearInterval(timerId);
719 reinstall();
720 }
721
722 timerId = setInterval(reinstall, 500);
723 if (document.addEventListener)
724 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
725 else
726 window.onload = reinstallAndRemoveTimer;
Junio C Hamano11821ed2011-10-19 18:42:09727}
728
729}
Junio C Hamano9d971152012-12-19 00:43:11730asciidoc.install();
Junio C Hamano11821ed2011-10-19 18:42:09731/*]]>*/
732</script>
733</head>
Junio C Hamano9d971152012-12-19 00:43:11734<body class="manpage">
Junio C Hamano11821ed2011-10-19 18:42:09735<div id="header">
736<h1>
737gitweb(1) Manual Page
738</h1>
739<h2>NAME</h2>
740<div class="sectionbody">
741<p>gitweb -
742 Git web interface (web frontend to Git repositories)
743</p>
744</div>
745</div>
746<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11747<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:09748<h2 id="_synopsis">SYNOPSIS</h2>
749<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21750<div class="paragraph"><p>To get started with gitweb, run <a href="git-instaweb.html">git-instaweb(1)</a> from a Git repository.
Junio C Hamano11821ed2011-10-19 18:42:09751This would configure and start your web server, and run web browser pointing to
752gitweb.</p></div>
753</div>
Junio C Hamano9d971152012-12-19 00:43:11754</div>
755<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:09756<h2 id="_description">DESCRIPTION</h2>
757<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21758<div class="paragraph"><p>Gitweb provides a web interface to Git repositories. Its features include:</p></div>
Junio C Hamano11821ed2011-10-19 18:42:09759<div class="ulist"><ul>
760<li>
761<p>
762Viewing multiple Git repositories with common root.
763</p>
764</li>
765<li>
766<p>
767Browsing every revision of the repository.
768</p>
769</li>
770<li>
771<p>
772Viewing the contents of files in the repository at any revision.
773</p>
774</li>
775<li>
776<p>
777Viewing the revision log of branches, history of files and directories,
778 see what was changed when, by who.
779</p>
780</li>
781<li>
782<p>
783Viewing the blame/annotation details of any file (if enabled).
784</p>
785</li>
786<li>
787<p>
788Generating RSS and Atom feeds of commits, for any branch.
789 The feeds are auto-discoverable in modern web browsers.
790</p>
791</li>
792<li>
793<p>
794Viewing everything that was changed in a revision, and step through
795 revisions one at a time, viewing the history of the repository.
796</p>
797</li>
798<li>
799<p>
800Finding commits which commit messages matches given search term.
801</p>
802</li>
803</ul></div>
804<div class="paragraph"><p>See <a href="http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb">http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb</a> or
805<a href="http://repo.or.cz/w/git.git/tree/HEAD:/gitweb/">http://repo.or.cz/w/git.git/tree/HEAD:/gitweb/</a> for gitweb source code,
806browsed using gitweb itself.</p></div>
807</div>
Junio C Hamano9d971152012-12-19 00:43:11808</div>
809<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:09810<h2 id="_configuration">CONFIGURATION</h2>
811<div class="sectionbody">
812<div class="paragraph"><p>Various aspects of gitweb&#8217;s behavior can be controlled through the configuration
Junio C Hamanoa28a9202012-06-21 07:08:23813file <em>gitweb_config.perl</em> or <em>/etc/gitweb.conf</em>. See the <a href="gitweb.conf.html">gitweb.conf(5)</a>
Junio C Hamano11821ed2011-10-19 18:42:09814for details.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11815<div class="sect2">
816<h3 id="_repositories">Repositories</h3>
Junio C Hamano11821ed2011-10-19 18:42:09817<div class="paragraph"><p>Gitweb can show information from one or more Git repositories. These
818repositories have to be all on local filesystem, and have to share common
819repository root, i.e. be all under a single parent repository (but see also
820"Advanced web server setup" section, "Webserver configuration with multiple
821projects' root" subsection).</p></div>
822<div class="listingblock">
823<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53824<pre><code>our $projectroot = '/path/to/parent/directory';</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:09825</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53826<div class="paragraph"><p>The default value for <code>$projectroot</code> is <em>/pub/git</em>. You can change it during
827building gitweb via <code>GITWEB_PROJECTROOT</code> build configuration variable.</p></div>
828<div class="paragraph"><p>By default all Git repositories under <code>$projectroot</code> are visible and available
Junio C Hamano11821ed2011-10-19 18:42:09829to gitweb. The list of projects is generated by default by scanning the
Junio C Hamanoc14e6ad2014-10-31 20:25:53830<code>$projectroot</code> directory for Git repositories (for object databases to be
Junio C Hamano11821ed2011-10-19 18:42:09831more exact; gitweb is not interested in a working area, and is best suited
832to showing "bare" repositories).</p></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53833<div class="paragraph"><p>The name of the repository in gitweb is the path to its <code>$GIT_DIR</code> (its object
834database) relative to <code>$projectroot</code>. Therefore the repository $repo can be
Junio C Hamano11821ed2011-10-19 18:42:09835found at "$projectroot/$repo".</p></div>
Junio C Hamano9d971152012-12-19 00:43:11836</div>
837<div class="sect2">
838<h3 id="_projects_list_file_format">Projects list file format</h3>
Junio C Hamano11821ed2011-10-19 18:42:09839<div class="paragraph"><p>Instead of having gitweb find repositories by scanning filesystem
840starting from $projectroot, you can provide a pre-generated list of
Junio C Hamanoc14e6ad2014-10-31 20:25:53841visible projects by setting <code>$projects_list</code> to point to a plain text
Junio C Hamano11821ed2011-10-19 18:42:09842file with a list of projects (with some additional info).</p></div>
843<div class="paragraph"><p>This file uses the following format:</p></div>
844<div class="ulist"><ul>
845<li>
846<p>
847One record (for project / repository) per line; does not support line
848continuation (newline escaping).
849</p>
850</li>
851<li>
852<p>
853Leading and trailing whitespace are ignored.
854</p>
855</li>
856<li>
857<p>
858Whitespace separated fields; any run of whitespace can be used as field
Junio C Hamanoc14e6ad2014-10-31 20:25:53859separator (rules for Perl&#8217;s "<code>split(" ", $line)</code>").
Junio C Hamano11821ed2011-10-19 18:42:09860</p>
861</li>
862<li>
863<p>
864Fields use modified URI encoding, defined in RFC 3986, section 2.1
865(Percent-Encoding), or rather "Query string encoding" (see
866<a href="http://en.wikipedia.org/wiki/Query_string#URL_encoding">http://en.wikipedia.org/wiki/Query_string#URL_encoding</a>), the difference
867being that SP (" ") can be encoded as "&#43;" (and therefore "&#43;" has to be
868also percent-encoded).
869</p>
870<div class="paragraph"><p>Reserved characters are: "%" (used for encoding), "&#43;" (can be used to
871encode SPACE), all whitespace characters as defined in Perl, including SP,
872TAB and LF, (used to separate fields in a record).</p></div>
873</li>
874<li>
875<p>
876Currently recognized fields are:
877</p>
878<div class="dlist"><dl>
879<dt class="hdlist1">
880&lt;repository path&gt;
881</dt>
882<dd>
883<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53884 path to repository GIT_DIR, relative to <code>$projectroot</code>
Junio C Hamano11821ed2011-10-19 18:42:09885</p>
886</dd>
887<dt class="hdlist1">
888&lt;repository owner&gt;
889</dt>
890<dd>
891<p>
892 displayed as repository owner, preferably full name, or email,
893 or both
894</p>
895</dd>
896</dl></div>
897</li>
898</ul></div>
899<div class="paragraph"><p>You can generate the projects list index file using the project_index action
900(the <em>TXT</em> link on projects list page) directly from gitweb; see also
901"Generating projects list using gitweb" section below.</p></div>
902<div class="paragraph"><p>Example contents:</p></div>
903<div class="listingblock">
904<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53905<pre><code>foo.git Joe+R+Hacker+&lt;joe@example.com&gt;
906foo/bar.git O+W+Ner+&lt;owner@example.org&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:09907</div></div>
908<div class="paragraph"><p>By default this file controls only which projects are <strong>visible</strong> on projects
Junio C Hamano076ffcc2013-02-06 05:13:21909list page (note that entries that do not point to correctly recognized Git
Junio C Hamano11821ed2011-10-19 18:42:09910repositories won&#8217;t be displayed by gitweb). Even if a project is not
911visible on projects list page, you can view it nevertheless by hand-crafting
Junio C Hamanoc14e6ad2014-10-31 20:25:53912a gitweb URL. By setting <code>$strict_export</code> configuration variable (see
Junio C Hamanoa28a9202012-06-21 07:08:23913<a href="gitweb.conf.html">gitweb.conf(5)</a>) to true value you can allow viewing only of
Junio C Hamano11821ed2011-10-19 18:42:09914repositories also shown on the overview page (i.e. only projects explicitly
915listed in projects list file will be accessible).</p></div>
Junio C Hamano9d971152012-12-19 00:43:11916</div>
917<div class="sect2">
918<h3 id="_generating_projects_list_using_gitweb">Generating projects list using gitweb</h3>
Junio C Hamano11821ed2011-10-19 18:42:09919<div class="paragraph"><p>We assume that GITWEB_CONFIG has its default Makefile value, namely
920<em>gitweb_config.perl</em>. Put the following in <em>gitweb_make_index.perl</em> file:</p></div>
921<div class="listingblock">
922<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53923<pre><code>read_config_file("gitweb_config.perl");
924$projects_list = $projectroot;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:09925</div></div>
926<div class="paragraph"><p>Then create the following script to get list of project in the format
927suitable for GITWEB_LIST build configuration variable (or
Junio C Hamanoc14e6ad2014-10-31 20:25:53928<code>$projects_list</code> variable in gitweb config):</p></div>
Junio C Hamano11821ed2011-10-19 18:42:09929<div class="listingblock">
930<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53931<pre><code>#!/bin/sh
Junio C Hamano11821ed2011-10-19 18:42:09932
933export GITWEB_CONFIG="gitweb_make_index.perl"
934export GATEWAY_INTERFACE="CGI/1.1"
935export HTTP_ACCEPT="*/*"
936export REQUEST_METHOD="GET"
937export QUERY_STRING="a=project_index"
938
Junio C Hamanoc14e6ad2014-10-31 20:25:53939perl -- /var/www/cgi-bin/gitweb.cgi</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:09940</div></div>
941<div class="paragraph"><p>Run this script and save its output to a file. This file could then be used
Junio C Hamanoc14e6ad2014-10-31 20:25:53942as projects list file, which means that you can set <code>$projects_list</code> to its
Junio C Hamano11821ed2011-10-19 18:42:09943filename.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11944</div>
945<div class="sect2">
Junio C Hamano076ffcc2013-02-06 05:13:21946<h3 id="_controlling_access_to_git_repositories">Controlling access to Git repositories</h3>
Junio C Hamanoc14e6ad2014-10-31 20:25:53947<div class="paragraph"><p>By default all Git repositories under <code>$projectroot</code> are visible and
Junio C Hamano11821ed2011-10-19 18:42:09948available to gitweb. You can however configure how gitweb controls access
949to repositories.</p></div>
950<div class="ulist"><ul>
951<li>
952<p>
953As described in "Projects list file format" section, you can control which
954projects are <strong>visible</strong> by selectively including repositories in projects
Junio C Hamanoc14e6ad2014-10-31 20:25:53955list file, and setting <code>$projects_list</code> gitweb configuration variable to
956point to it. With <code>$strict_export</code> set, projects list file can be used to
Junio C Hamano11821ed2011-10-19 18:42:09957control which repositories are <strong>available</strong> as well.
958</p>
959</li>
960<li>
961<p>
962You can configure gitweb to only list and allow viewing of the explicitly
Junio C Hamanoc14e6ad2014-10-31 20:25:53963exported repositories, via <code>$export_ok</code> variable in gitweb config file; see
Junio C Hamanoa28a9202012-06-21 07:08:23964<a href="gitweb.conf.html">gitweb.conf(5)</a> manpage. If it evaluates to true, gitweb shows
Junio C Hamanoc14e6ad2014-10-31 20:25:53965repositories only if this file named by <code>$export_ok</code> exists in its object
966database (if directory has the magic file named <code>$export_ok</code>).
Junio C Hamano11821ed2011-10-19 18:42:09967</p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53968<div class="paragraph"><p>For example <a href="git-daemon.html">git-daemon(1)</a> by default (unless <code>--export-all</code> option
Junio C Hamano11821ed2011-10-19 18:42:09969is used) allows pulling only for those repositories that have
970<em>git-daemon-export-ok</em> file. Adding</p></div>
971<div class="listingblock">
972<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53973<pre><code>our $export_ok = "git-daemon-export-ok";</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:09974</div></div>
975<div class="paragraph"><p>makes gitweb show and allow access only to those repositories that can be
Junio C Hamanoc14e6ad2014-10-31 20:25:53976fetched from via <code>git://</code> protocol.</p></div>
Junio C Hamano11821ed2011-10-19 18:42:09977</li>
978<li>
979<p>
980Finally, it is possible to specify an arbitrary perl subroutine that will
981be called for each repository to determine if it can be exported. The
982subroutine receives an absolute path to the project (repository) as its only
983parameter (i.e. "$projectroot/$project").
984</p>
985<div class="paragraph"><p>For example, if you use mod_perl to run the script, and have dumb
986HTTP protocol authentication configured for your repositories, you
987can use the following hook to allow access only if the user is
988authorized to read the files:</p></div>
989<div class="listingblock">
990<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53991<pre><code>$export_auth_hook = sub {
Junio C Hamano11821ed2011-10-19 18:42:09992 use Apache2::SubRequest ();
993 use Apache2::Const -compile =&gt; qw(HTTP_OK);
994 my $path = "$_[0]/HEAD";
995 my $r = Apache2::RequestUtil-&gt;request;
996 my $sub = $r-&gt;lookup_file($path);
997 return $sub-&gt;filename eq $path
998 &amp;&amp; $sub-&gt;status == Apache2::Const::HTTP_OK;
Junio C Hamanoc14e6ad2014-10-31 20:25:53999};</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091000</div></div>
1001</li>
1002</ul></div>
Junio C Hamano9d971152012-12-19 00:43:111003</div>
1004<div class="sect2">
1005<h3 id="_per_repository_gitweb_configuration">Per-repository gitweb configuration</h3>
Junio C Hamano11821ed2011-10-19 18:42:091006<div class="paragraph"><p>You can configure individual repositories shown in gitweb by creating file
Junio C Hamano076ffcc2013-02-06 05:13:211007in the <em>GIT_DIR</em> of Git repository, or by setting some repo configuration
Junio C Hamanoa28a9202012-06-21 07:08:231008variable (in <em>GIT_DIR/config</em>, see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamano11821ed2011-10-19 18:42:091009<div class="paragraph"><p>You can use the following files in repository:</p></div>
1010<div class="dlist"><dl>
1011<dt class="hdlist1">
1012README.html
1013</dt>
1014<dd>
1015<p>
1016 A html file (HTML fragment) which is included on the gitweb project
Junio C Hamanoc14e6ad2014-10-31 20:25:531017 "summary" page inside <code>&lt;div&gt;</code> block element. You can use it for longer
Junio C Hamano11821ed2011-10-19 18:42:091018 description of a project, to provide links (for example to project&#8217;s
1019 homepage), etc. This is recognized only if XSS prevention is off
Junio C Hamanoc14e6ad2014-10-31 20:25:531020 (<code>$prevent_xss</code> is false, see <a href="gitweb.conf.html">gitweb.conf(5)</a>); a way to include
Junio C Hamano11821ed2011-10-19 18:42:091021 a README safely when XSS prevention is on may be worked out in the
1022 future.
1023</p>
1024</dd>
1025<dt class="hdlist1">
Junio C Hamanoc14e6ad2014-10-31 20:25:531026description (or <code>gitweb.description</code>)
Junio C Hamano11821ed2011-10-19 18:42:091027</dt>
1028<dd>
1029<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531030 Short (shortened to <code>$projects_list_description_width</code> in the projects
Junio C Hamano11821ed2011-10-19 18:42:091031 list page, which is 25 characters by default; see
Junio C Hamanoa28a9202012-06-21 07:08:231032 <a href="gitweb.conf.html">gitweb.conf(5)</a>) single line description of a project (of a
Junio C Hamano11821ed2011-10-19 18:42:091033 repository). Plain text file; HTML will be escaped. By default set to
1034</p>
1035<div class="listingblock">
1036<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531037<pre><code>Unnamed repository; edit this file to name it for gitweb.</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091038</div></div>
1039<div class="paragraph"><p>from the template during repository creation, usually installed in
Junio C Hamanoc14e6ad2014-10-31 20:25:531040<em>/usr/share/git-core/templates/</em>. You can use the <code>gitweb.description</code> repo
Junio C Hamano11821ed2011-10-19 18:42:091041configuration variable, but the file takes precedence.</p></div>
1042</dd>
1043<dt class="hdlist1">
Junio C Hamanoc14e6ad2014-10-31 20:25:531044category (or <code>gitweb.category</code>)
Junio C Hamano11821ed2011-10-19 18:42:091045</dt>
1046<dd>
1047<p>
1048 Singe line category of a project, used to group projects if
Junio C Hamanoc14e6ad2014-10-31 20:25:531049 <code>$projects_list_group_categories</code> is enabled. By default (file and
Junio C Hamano11821ed2011-10-19 18:42:091050 configuration variable absent), uncategorized projects are put in the
Junio C Hamanoc14e6ad2014-10-31 20:25:531051 <code>$project_list_default_category</code> category. You can use the
1052 <code>gitweb.category</code> repo configuration variable, but the file takes
Junio C Hamano11821ed2011-10-19 18:42:091053 precedence.
1054</p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531055<div class="paragraph"><p>The configuration variables <code>$projects_list_group_categories</code> and
1056<code>$project_list_default_category</code> are described in <a href="gitweb.conf.html">gitweb.conf(5)</a></p></div>
Junio C Hamano11821ed2011-10-19 18:42:091057</dd>
1058<dt class="hdlist1">
Junio C Hamanoc14e6ad2014-10-31 20:25:531059cloneurl (or multiple-valued <code>gitweb.url</code>)
Junio C Hamano11821ed2011-10-19 18:42:091060</dt>
1061<dd>
1062<p>
1063 File with repository URL (used for clone and fetch), one per line.
1064 Displayed in the project summary page. You can use multiple-valued
Junio C Hamanoc14e6ad2014-10-31 20:25:531065 <code>gitweb.url</code> repository configuration variable for that, but the file
Junio C Hamano11821ed2011-10-19 18:42:091066 takes precedence.
1067</p>
1068<div class="paragraph"><p>This is per-repository enhancement / version of global prefix-based
Junio C Hamanoc14e6ad2014-10-31 20:25:531069<code>@git_base_url_list</code> gitweb configuration variable (see
Junio C Hamanoa28a9202012-06-21 07:08:231070<a href="gitweb.conf.html">gitweb.conf(5)</a>).</p></div>
Junio C Hamano11821ed2011-10-19 18:42:091071</dd>
1072<dt class="hdlist1">
1073gitweb.owner
1074</dt>
1075<dd>
1076<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531077 You can use the <code>gitweb.owner</code> repository configuration variable to set
Junio C Hamano11821ed2011-10-19 18:42:091078 repository&#8217;s owner. It is displayed in the project list and summary
1079 page.
1080</p>
1081<div class="paragraph"><p>If it&#8217;s not set, filesystem directory&#8217;s owner is used (via GECOS field,
Junio C Hamanoc14e6ad2014-10-31 20:25:531082i.e. real name field from <strong>getpwuid</strong>(3)) if <code>$projects_list</code> is unset
1083(gitweb scans <code>$projectroot</code> for repositories); if <code>$projects_list</code>
Junio C Hamano11821ed2011-10-19 18:42:091084points to file with list of repositories, then project owner defaults to
1085value from this file for given repository.</p></div>
1086</dd>
1087<dt class="hdlist1">
Junio C Hamanoc14e6ad2014-10-31 20:25:531088various <code>gitweb.*</code> config variables (in config)
Junio C Hamano11821ed2011-10-19 18:42:091089</dt>
1090<dd>
1091<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531092 Read description of <code>%feature</code> hash for detailed list, and descriptions.
Junio C Hamanoa28a9202012-06-21 07:08:231093 See also "Configuring gitweb features" section in <a href="gitweb.conf.html">gitweb.conf(5)</a>
Junio C Hamano11821ed2011-10-19 18:42:091094</p>
1095</dd>
1096</dl></div>
1097</div>
Junio C Hamano9d971152012-12-19 00:43:111098</div>
1099</div>
1100<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:091101<h2 id="_actions_and_urls">ACTIONS, AND URLS</h2>
1102<div class="sectionbody">
1103<div class="paragraph"><p>Gitweb can use path_info (component) based URLs, or it can pass all necessary
1104information via query parameters. The typical gitweb URLs are broken down in to
1105five components:</p></div>
1106<div class="listingblock">
1107<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531108<pre><code>.../gitweb.cgi/&lt;repo&gt;/&lt;action&gt;/&lt;revision&gt;:/&lt;path&gt;?&lt;arguments&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091109</div></div>
1110<div class="dlist"><dl>
1111<dt class="hdlist1">
1112repo
1113</dt>
1114<dd>
1115<p>
1116 The repository the action will be performed on.
1117</p>
1118<div class="paragraph"><p>All actions except for those that list all available projects,
1119in whatever form, require this parameter.</p></div>
1120</dd>
1121<dt class="hdlist1">
1122action
1123</dt>
1124<dd>
1125<p>
1126 The action that will be run. Defaults to <em>projects_list</em> if repo
1127 is not set, and to <em>summary</em> otherwise.
1128</p>
1129</dd>
1130<dt class="hdlist1">
1131revision
1132</dt>
1133<dd>
1134<p>
1135 Revision shown. Defaults to HEAD.
1136</p>
1137</dd>
1138<dt class="hdlist1">
1139path
1140</dt>
1141<dd>
1142<p>
1143 The path within the &lt;repository&gt; that the action is performed on,
1144 for those actions that require it.
1145</p>
1146</dd>
1147<dt class="hdlist1">
1148arguments
1149</dt>
1150<dd>
1151<p>
1152 Any arguments that control the behaviour of the action.
1153</p>
1154</dd>
1155</dl></div>
1156<div class="paragraph"><p>Some actions require or allow to specify two revisions, and sometimes even two
1157pathnames. In most general form such path_info (component) based gitweb URL
1158looks like this:</p></div>
1159<div class="listingblock">
1160<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531161<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>
Junio C Hamano11821ed2011-10-19 18:42:091162</div></div>
1163<div class="paragraph"><p>Each action is implemented as a subroutine, and must be present in %actions
1164hash. Some actions are disabled by default, and must be turned on via feature
1165mechanism. For example to enable <em>blame</em> view add the following to gitweb
1166configuration file:</p></div>
1167<div class="listingblock">
1168<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531169<pre><code>$feature{'blame'}{'default'} = [1];</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091170</div></div>
Junio C Hamano9d971152012-12-19 00:43:111171<div class="sect2">
1172<h3 id="_actions">Actions:</h3>
Junio C Hamano11821ed2011-10-19 18:42:091173<div class="paragraph"><p>The standard actions are:</p></div>
1174<div class="dlist"><dl>
1175<dt class="hdlist1">
1176project_list
1177</dt>
1178<dd>
1179<p>
1180 Lists the available Git repositories. This is the default command if no
1181 repository is specified in the URL.
1182</p>
1183</dd>
1184<dt class="hdlist1">
1185summary
1186</dt>
1187<dd>
1188<p>
1189 Displays summary about given repository. This is the default command if
1190 no action is specified in URL, and only repository is specified.
1191</p>
1192</dd>
1193<dt class="hdlist1">
1194heads
1195</dt>
1196<dt class="hdlist1">
1197remotes
1198</dt>
1199<dd>
1200<p>
1201 Lists all local or all remote-tracking branches in given repository.
1202</p>
1203<div class="paragraph"><p>The latter is not available by default, unless configured.</p></div>
1204</dd>
1205<dt class="hdlist1">
1206tags
1207</dt>
1208<dd>
1209<p>
1210 List all tags (lightweight and annotated) in given repository.
1211</p>
1212</dd>
1213<dt class="hdlist1">
1214blob
1215</dt>
1216<dt class="hdlist1">
1217tree
1218</dt>
1219<dd>
1220<p>
1221 Shows the files and directories in a given repository path, at given
1222 revision. This is default command if no action is specified in the URL,
1223 and path is given.
1224</p>
1225</dd>
1226<dt class="hdlist1">
1227blob_plain
1228</dt>
1229<dd>
1230<p>
1231 Returns the raw data for the file in given repository, at given path and
1232 revision. Links to this action are marked <em>raw</em>.
1233</p>
1234</dd>
1235<dt class="hdlist1">
1236blobdiff
1237</dt>
1238<dd>
1239<p>
1240 Shows the difference between two revisions of the same file.
1241</p>
1242</dd>
1243<dt class="hdlist1">
1244blame
1245</dt>
1246<dt class="hdlist1">
1247blame_incremental
1248</dt>
1249<dd>
1250<p>
1251 Shows the blame (also called annotation) information for a file. On a
1252 per line basis it shows the revision in which that line was last changed
1253 and the user that committed the change. The incremental version (which
1254 if configured is used automatically when JavaScript is enabled) uses
1255 Ajax to incrementally add blame info to the contents of given file.
1256</p>
1257<div class="paragraph"><p>This action is disabled by default for performance reasons.</p></div>
1258</dd>
1259<dt class="hdlist1">
1260commit
1261</dt>
1262<dt class="hdlist1">
1263commitdiff
1264</dt>
1265<dd>
1266<p>
1267 Shows information about a specific commit in a repository. The <em>commit</em>
1268 view shows information about commit in more detail, the <em>commitdiff</em>
1269 action shows changeset for given commit.
1270</p>
1271</dd>
1272<dt class="hdlist1">
1273patch
1274</dt>
1275<dd>
1276<p>
1277 Returns the commit in plain text mail format, suitable for applying with
Junio C Hamanoa28a9202012-06-21 07:08:231278 <a href="git-am.html">git-am(1)</a>.
Junio C Hamano11821ed2011-10-19 18:42:091279</p>
1280</dd>
1281<dt class="hdlist1">
1282tag
1283</dt>
1284<dd>
1285<p>
1286 Display specific annotated tag (tag object).
1287</p>
1288</dd>
1289<dt class="hdlist1">
1290log
1291</dt>
1292<dt class="hdlist1">
1293shortlog
1294</dt>
1295<dd>
1296<p>
1297 Shows log information (commit message or just commit subject) for a
1298 given branch (starting from given revision).
1299</p>
1300<div class="paragraph"><p>The <em>shortlog</em> view is more compact; it shows one commit per line.</p></div>
1301</dd>
1302<dt class="hdlist1">
1303history
1304</dt>
1305<dd>
1306<p>
1307 Shows history of the file or directory in a given repository path,
1308 starting from given revision (defaults to HEAD, i.e. default branch).
1309</p>
1310<div class="paragraph"><p>This view is similar to <em>shortlog</em> view.</p></div>
1311</dd>
1312<dt class="hdlist1">
1313rss
1314</dt>
1315<dt class="hdlist1">
1316atom
1317</dt>
1318<dd>
1319<p>
1320 Generates an RSS (or Atom) feed of changes to repository.
1321</p>
1322</dd>
1323</dl></div>
1324</div>
Junio C Hamano9d971152012-12-19 00:43:111325</div>
1326</div>
1327<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:091328<h2 id="_webserver_configuration">WEBSERVER CONFIGURATION</h2>
1329<div class="sectionbody">
1330<div class="paragraph"><p>This section explains how to configure some common webservers to run gitweb. In
Junio C Hamanoc14e6ad2014-10-31 20:25:531331all cases, <code>/path/to/gitweb</code> in the examples is the directory you ran installed
1332gitweb in, and contains <code>gitweb_config.perl</code>.</p></div>
Junio C Hamano11821ed2011-10-19 18:42:091333<div class="paragraph"><p>If you&#8217;ve configured a web server that isn&#8217;t listed here for gitweb, please send
1334in the instructions so they can be included in a future release.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111335<div class="sect2">
1336<h3 id="_apache_as_cgi">Apache as CGI</h3>
Junio C Hamano11821ed2011-10-19 18:42:091337<div class="paragraph"><p>Apache must be configured to support CGI scripts in the directory in
1338which gitweb is installed. Let&#8217;s assume that it is <em>/var/www/cgi-bin</em>
1339directory.</p></div>
1340<div class="listingblock">
1341<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531342<pre><code>ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
Junio C Hamano11821ed2011-10-19 18:42:091343
1344&lt;Directory "/var/www/cgi-bin"&gt;
1345 Options Indexes FollowSymlinks ExecCGI
1346 AllowOverride None
1347 Order allow,deny
1348 Allow from all
Junio C Hamanoc14e6ad2014-10-31 20:25:531349&lt;/Directory&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091350</div></div>
1351<div class="paragraph"><p>With that configuration the full path to browse repositories would be:</p></div>
1352<div class="literalblock">
1353<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531354<pre><code>http://server/cgi-bin/gitweb.cgi</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091355</div></div>
Junio C Hamano9d971152012-12-19 00:43:111356</div>
1357<div class="sect2">
1358<h3 id="_apache_with_mod_perl_via_modperl_registry">Apache with mod_perl, via ModPerl::Registry</h3>
Junio C Hamano11821ed2011-10-19 18:42:091359<div class="paragraph"><p>You can use mod_perl with gitweb. You must install Apache::Registry
1360(for mod_perl 1.x) or ModPerl::Registry (for mod_perl 2.x) to enable
1361this support.</p></div>
1362<div class="paragraph"><p>Assuming that gitweb is installed to <em>/var/www/perl</em>, the following
1363Apache configuration (for mod_perl 2.x) is suitable.</p></div>
1364<div class="listingblock">
1365<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531366<pre><code>Alias /perl "/var/www/perl"
Junio C Hamano11821ed2011-10-19 18:42:091367
1368&lt;Directory "/var/www/perl"&gt;
1369 SetHandler perl-script
1370 PerlResponseHandler ModPerl::Registry
1371 PerlOptions +ParseHeaders
1372 Options Indexes FollowSymlinks +ExecCGI
1373 AllowOverride None
1374 Order allow,deny
1375 Allow from all
Junio C Hamanoc14e6ad2014-10-31 20:25:531376&lt;/Directory&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091377</div></div>
1378<div class="paragraph"><p>With that configuration the full path to browse repositories would be:</p></div>
1379<div class="literalblock">
1380<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531381<pre><code>http://server/perl/gitweb.cgi</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091382</div></div>
Junio C Hamano9d971152012-12-19 00:43:111383</div>
1384<div class="sect2">
1385<h3 id="_apache_with_fastcgi">Apache with FastCGI</h3>
Junio C Hamano11821ed2011-10-19 18:42:091386<div class="paragraph"><p>Gitweb works with Apache and FastCGI. First you need to rename, copy
1387or symlink gitweb.cgi to gitweb.fcgi. Let&#8217;s assume that gitweb is
1388installed in <em>/usr/share/gitweb</em> directory. The following Apache
1389configuration is suitable (UNTESTED!)</p></div>
1390<div class="listingblock">
1391<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531392<pre><code>FastCgiServer /usr/share/gitweb/gitweb.cgi
Junio C Hamano11821ed2011-10-19 18:42:091393ScriptAlias /gitweb /usr/share/gitweb/gitweb.cgi
1394
1395Alias /gitweb/static /usr/share/gitweb/static
1396&lt;Directory /usr/share/gitweb/static&gt;
1397 SetHandler default-handler
Junio C Hamanoc14e6ad2014-10-31 20:25:531398&lt;/Directory&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091399</div></div>
1400<div class="paragraph"><p>With that configuration the full path to browse repositories would be:</p></div>
1401<div class="literalblock">
1402<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531403<pre><code>http://server/gitweb</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091404</div></div>
1405</div>
Junio C Hamano9d971152012-12-19 00:43:111406</div>
1407</div>
1408<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:091409<h2 id="_advanced_web_server_setup">ADVANCED WEB SERVER SETUP</h2>
1410<div class="sectionbody">
Junio C Hamanoc14e6ad2014-10-31 20:25:531411<div class="paragraph"><p>All of those examples use request rewriting, and need <code>mod_rewrite</code>
Junio C Hamano11821ed2011-10-19 18:42:091412(or equivalent; examples below are written for Apache).</p></div>
Junio C Hamano9d971152012-12-19 00:43:111413<div class="sect2">
1414<h3 id="_single_url_for_gitweb_and_for_fetching">Single URL for gitweb and for fetching</h3>
Junio C Hamanoc14e6ad2014-10-31 20:25:531415<div class="paragraph"><p>If you want to have one URL for both gitweb and your <code>http://</code>
Junio C Hamano11821ed2011-10-19 18:42:091416repositories, you can configure Apache like this:</p></div>
1417<div class="listingblock">
1418<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531419<pre><code>&lt;VirtualHost *:80&gt;
Junio C Hamano11821ed2011-10-19 18:42:091420 ServerName git.example.org
1421 DocumentRoot /pub/git
1422 SetEnv GITWEB_CONFIG /etc/gitweb.conf
1423
1424 # turning on mod rewrite
1425 RewriteEngine on
1426
1427 # make the front page an internal rewrite to the gitweb script
1428 RewriteRule ^/$ /cgi-bin/gitweb.cgi
1429
1430 # make access for "dumb clients" work
1431 RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \
1432 /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
Junio C Hamanoc14e6ad2014-10-31 20:25:531433&lt;/VirtualHost&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091434</div></div>
1435<div class="paragraph"><p>The above configuration expects your public repositories to live under
Junio C Hamanoc14e6ad2014-10-31 20:25:531436<em>/pub/git</em> and will serve them as <code>http://git.domain.org/dir-under-pub-git</code>,
Junio C Hamanod7fccbf2013-07-25 03:24:571437both as clonable Git URL and as browseable gitweb interface. If you then
Junio C Hamanoc14e6ad2014-10-31 20:25:531438start your <a href="git-daemon.html">git-daemon(1)</a> with <code>--base-path=/pub/git --export-all</code>
1439then you can even use the <code>git://</code> URL with exactly the same path.</p></div>
1440<div class="paragraph"><p>Setting the environment variable <code>GITWEB_CONFIG</code> will tell gitweb to use the
Junio C Hamano11821ed2011-10-19 18:42:091441named file (i.e. in this example <em>/etc/gitweb.conf</em>) as a configuration for
1442gitweb. You don&#8217;t really need it in above example; it is required only if
1443your configuration file is in different place than built-in (during
1444compiling gitweb) <em>gitweb_config.perl</em> or <em>/etc/gitweb.conf</em>. See
Junio C Hamanoa28a9202012-06-21 07:08:231445<a href="gitweb.conf.html">gitweb.conf(5)</a> for details, especially information about precedence
Junio C Hamano11821ed2011-10-19 18:42:091446rules.</p></div>
1447<div class="paragraph"><p>If you use the rewrite rules from the example you <strong>might</strong> also need
1448something like the following in your gitweb configuration file
1449(<em>/etc/gitweb.conf</em> following example):</p></div>
1450<div class="listingblock">
1451<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531452<pre><code>@stylesheets = ("/some/absolute/path/gitweb.css");
Junio C Hamano11821ed2011-10-19 18:42:091453$my_uri = "/";
1454$home_link = "/";
Junio C Hamanoc14e6ad2014-10-31 20:25:531455$per_request_config = 1;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091456</div></div>
1457<div class="paragraph"><p>Nowadays though gitweb should create HTML base tag when needed (to set base
1458URI for relative links), so it should work automatically.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111459</div>
1460<div class="sect2">
1461<h3 id="_webserver_configuration_with_multiple_projects_root">Webserver configuration with multiple projects' root</h3>
Junio C Hamano11821ed2011-10-19 18:42:091462<div class="paragraph"><p>If you want to use gitweb with several project roots you can edit your
1463Apache virtual host and gitweb configuration files in the following way.</p></div>
1464<div class="paragraph"><p>The virtual host configuration (in Apache configuration file) should look
1465like this:</p></div>
1466<div class="listingblock">
1467<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531468<pre><code>&lt;VirtualHost *:80&gt;
Junio C Hamano11821ed2011-10-19 18:42:091469 ServerName git.example.org
1470 DocumentRoot /pub/git
1471 SetEnv GITWEB_CONFIG /etc/gitweb.conf
1472
1473 # turning on mod rewrite
1474 RewriteEngine on
1475
1476 # make the front page an internal rewrite to the gitweb script
1477 RewriteRule ^/$ /cgi-bin/gitweb.cgi [QSA,L,PT]
1478
1479 # look for a public_git folder in unix users' home
1480 # http://git.example.org/~&lt;user&gt;/
1481 RewriteRule ^/\~([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1482 [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
1483
1484 # http://git.example.org/+&lt;user&gt;/
1485 #RewriteRule ^/\+([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1486 [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
1487
1488 # http://git.example.org/user/&lt;user&gt;/
1489 #RewriteRule ^/user/([^\/]+)/(gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1490 [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
1491
1492 # defined list of project roots
1493 RewriteRule ^/scm(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1494 [QSA,E=GITWEB_PROJECTROOT:/pub/scm/,L,PT]
1495 RewriteRule ^/var(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \
1496 [QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
1497
1498 # make access for "dumb clients" work
1499 RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \
1500 /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
Junio C Hamanoc14e6ad2014-10-31 20:25:531501&lt;/VirtualHost&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091502</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531503<div class="paragraph"><p>Here actual project root is passed to gitweb via <code>GITWEB_PROJECT_ROOT</code>
Junio C Hamano11821ed2011-10-19 18:42:091504environment variable from a web server, so you need to put the following
1505line in gitweb configuration file (<em>/etc/gitweb.conf</em> in above example):</p></div>
1506<div class="listingblock">
1507<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531508<pre><code>$projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/pub/git";</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091509</div></div>
1510<div class="paragraph"><p><strong>Note</strong> that this requires to be set for each request, so either
Junio C Hamanoc14e6ad2014-10-31 20:25:531511<code>$per_request_config</code> must be false, or the above must be put in code
1512referenced by <code>$per_request_config</code>;</p></div>
1513<div class="paragraph"><p>These configurations enable two things. First, each unix user (<code>&lt;user&gt;</code>) of
Junio C Hamano076ffcc2013-02-06 05:13:211514the server will be able to browse through gitweb Git repositories found in
Junio C Hamano11821ed2011-10-19 18:42:091515<em>~/public_git/</em> with the following url:</p></div>
1516<div class="literalblock">
1517<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531518<pre><code>http://git.example.org/~&lt;user&gt;/</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091519</div></div>
1520<div class="paragraph"><p>If you do not want this feature on your server just remove the second
1521rewrite rule.</p></div>
1522<div class="paragraph"><p>If you already use &#8216;mod_userdir` in your virtual host or you don&#8217;t want to
1523use the '~&#8217; as first character, just comment or remove the second rewrite
1524rule, and uncomment one of the following according to what you want.</p></div>
1525<div class="paragraph"><p>Second, repositories found in <em>/pub/scm/</em> and <em>/var/git/</em> will be accessible
Junio C Hamanoc14e6ad2014-10-31 20:25:531526through <code>http://git.example.org/scm/</code> and <code>http://git.example.org/var/</code>.
Junio C Hamano11821ed2011-10-19 18:42:091527You can add as many project roots as you want by adding rewrite rules like
1528the third and the fourth.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111529</div>
1530<div class="sect2">
1531<h3 id="_path_info_usage">PATH_INFO usage</h3>
Junio C Hamano11821ed2011-10-19 18:42:091532<div class="paragraph"><p>If you enable PATH_INFO usage in gitweb by putting</p></div>
1533<div class="listingblock">
1534<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531535<pre><code>$feature{'pathinfo'}{'default'} = [1];</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091536</div></div>
1537<div class="paragraph"><p>in your gitweb configuration file, it is possible to set up your server so
1538that it consumes and produces URLs in the form</p></div>
1539<div class="literalblock">
1540<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531541<pre><code>http://git.example.com/project.git/shortlog/sometag</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091542</div></div>
1543<div class="paragraph"><p>i.e. without <em>gitweb.cgi</em> part, by using a configuration such as the
1544following. This configuration assumes that <em>/var/www/gitweb</em> is the
1545DocumentRoot of your webserver, contains the gitweb.cgi script and
1546complementary static files (stylesheet, favicon, JavaScript):</p></div>
1547<div class="listingblock">
1548<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531549<pre><code>&lt;VirtualHost *:80&gt;
Junio C Hamano11821ed2011-10-19 18:42:091550 ServerAlias git.example.com
1551
1552 DocumentRoot /var/www/gitweb
1553
1554 &lt;Directory /var/www/gitweb&gt;
1555 Options ExecCGI
1556 AddHandler cgi-script cgi
1557
1558 DirectoryIndex gitweb.cgi
1559
1560 RewriteEngine On
1561 RewriteCond %{REQUEST_FILENAME} !-f
1562 RewriteCond %{REQUEST_FILENAME} !-d
1563 RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
1564 &lt;/Directory&gt;
Junio C Hamanoc14e6ad2014-10-31 20:25:531565&lt;/VirtualHost&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091566</div></div>
1567<div class="paragraph"><p>The rewrite rule guarantees that existing static files will be properly
1568served, whereas any other URL will be passed to gitweb as PATH_INFO
1569parameter.</p></div>
1570<div class="paragraph"><p><strong>Notice</strong> that in this case you don&#8217;t need special settings for
Junio C Hamanoc14e6ad2014-10-31 20:25:531571<code>@stylesheets</code>, <code>$my_uri</code> and <code>$home_link</code>, but you lose "dumb client"
Junio C Hamano11821ed2011-10-19 18:42:091572access to your project .git dirs (described in "Single URL for gitweb and
1573for fetching" section). A possible workaround for the latter is the
1574following: in your project root dir (e.g. <em>/pub/git</em>) have the projects
1575named <strong>without</strong> a .git extension (e.g. <em>/pub/git/project</em> instead of
1576<em>/pub/git/project.git</em>) and configure Apache as follows:</p></div>
1577<div class="listingblock">
1578<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531579<pre><code>&lt;VirtualHost *:80&gt;
Junio C Hamano11821ed2011-10-19 18:42:091580 ServerAlias git.example.com
1581
1582 DocumentRoot /var/www/gitweb
1583
1584 AliasMatch ^(/.*?)(\.git)(/.*)?$ /pub/git$1$3
1585 &lt;Directory /var/www/gitweb&gt;
1586 Options ExecCGI
1587 AddHandler cgi-script cgi
1588
1589 DirectoryIndex gitweb.cgi
1590
1591 RewriteEngine On
1592 RewriteCond %{REQUEST_FILENAME} !-f
1593 RewriteCond %{REQUEST_FILENAME} !-d
1594 RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
1595 &lt;/Directory&gt;
Junio C Hamanoc14e6ad2014-10-31 20:25:531596&lt;/VirtualHost&gt;</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091597</div></div>
1598<div class="paragraph"><p>The additional AliasMatch makes it so that</p></div>
1599<div class="literalblock">
1600<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531601<pre><code>http://git.example.com/project.git</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091602</div></div>
Junio C Hamano076ffcc2013-02-06 05:13:211603<div class="paragraph"><p>will give raw access to the project&#8217;s Git dir (so that the project can be
Junio C Hamano11821ed2011-10-19 18:42:091604cloned), while</p></div>
1605<div class="literalblock">
1606<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531607<pre><code>http://git.example.com/project</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091608</div></div>
1609<div class="paragraph"><p>will provide human-friendly gitweb access.</p></div>
1610<div class="paragraph"><p>This solution is not 100% bulletproof, in the sense that if some project has
1611a named ref (branch, tag) starting with <em>git/</em>, then paths such as</p></div>
1612<div class="literalblock">
1613<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531614<pre><code>http://git.example.com/project/command/abranch..git/abranch</code></pre>
Junio C Hamano11821ed2011-10-19 18:42:091615</div></div>
1616<div class="paragraph"><p>will fail with a 404 error.</p></div>
1617</div>
Junio C Hamano9d971152012-12-19 00:43:111618</div>
1619</div>
1620<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:091621<h2 id="_bugs">BUGS</h2>
1622<div class="sectionbody">
1623<div class="paragraph"><p>Please report any bugs or feature requests to <a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>,
1624putting "gitweb" in the subject of email.</p></div>
1625</div>
Junio C Hamano9d971152012-12-19 00:43:111626</div>
1627<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:091628<h2 id="_see_also">SEE ALSO</h2>
1629<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231630<div class="paragraph"><p><a href="gitweb.conf.html">gitweb.conf(5)</a>, <a href="git-instaweb.html">git-instaweb(1)</a></p></div>
Junio C Hamano11821ed2011-10-19 18:42:091631<div class="paragraph"><p><em>gitweb/README</em>, <em>gitweb/INSTALL</em></p></div>
1632</div>
Junio C Hamano9d971152012-12-19 00:43:111633</div>
1634<div class="sect1">
Junio C Hamano11821ed2011-10-19 18:42:091635<h2 id="_git">GIT</h2>
1636<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231637<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano11821ed2011-10-19 18:42:091638</div>
1639</div>
Junio C Hamano9d971152012-12-19 00:43:111640</div>
Junio C Hamano11821ed2011-10-19 18:42:091641<div id="footnotes"><hr /></div>
1642<div id="footer">
1643<div id="footer-text">
Junio C Hamanobe244802014-04-25 18:21:381644Last updated 2014-03-14 14:59:49 PDT
Junio C Hamano11821ed2011-10-19 18:42:091645</div>
1646</div>
1647</body>
1648</html>