blob: b26bb8df6ac8da2ba0a613783fbf9208f0d4fdd1 [file] [log] [blame]
Junio C Hamano34b18112006-02-23 11:21:401<!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" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-cvsserver(1)</title>
Junio C Hamano34b18112006-02-23 11:21:408<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 Hamano34b18112006-02-23 11:21:4024}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano34b18112006-02-23 11:21:4037
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamano34b18112006-02-23 11:21:4041}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamano34b18112006-02-23 11:21:4046}
47
Junio C Hamano34b18112006-02-23 11:21:4048h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano34b18112006-02-23 11:21:4050 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano34b18112006-02-23 11:21:4056 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano34b18112006-02-23 11:21:4059 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
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 Hamano34b18112006-02-23 11:21:4070
71div.sectionbody {
Junio C Hamano34b18112006-02-23 11:21:4072 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
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, 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 Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano34b18112006-02-23 11:21:4094 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamano34b18112006-02-23 11:21:40100 color: #527bbd;
Junio C Hamano34b18112006-02-23 11:21:40101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano34b18112006-02-23 11:21:40103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamano34b18112006-02-23 11:21:40105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamano34b18112006-02-23 11:21:40107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamano34b18112006-02-23 11:21:40110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-text {
Junio C Hamano34b18112006-02-23 11:21:40116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamano34b18112006-02-23 11:21:40120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano34b18112006-02-23 11:21:40129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano34b18112006-02-23 11:21:40132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano34b18112006-02-23 11:21:40139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano34b18112006-02-23 11:21:40148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano34b18112006-02-23 11:21:40171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano34b18112006-02-23 11:21:40178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano34b18112006-02-23 11:21:40187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano34b18112006-02-23 11:21:40191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano34b18112006-02-23 11:21:40206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano34b18112006-02-23 11:21:40218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano34b18112006-02-23 11:21:40223}
224
Junio C Hamano34b18112006-02-23 11:21:40225div.imageblock div.content { padding-left: 0; }
Junio C Hamano34b18112006-02-23 11:21:40226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano34b18112006-02-23 11:21:40228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano34b18112006-02-23 11:21:40238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano34b18112006-02-23 11:21:40241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano34b18112006-02-23 11:21:40250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano34b18112006-02-23 11:21:40268
Junio C Hamano34b18112006-02-23 11:21:40269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano34b18112006-02-23 11:21:40277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano34b18112006-02-23 11:21:40287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano34b18112006-02-23 11:21:40289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano34b18112006-02-23 11:21:40291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano34b18112006-02-23 11:21:40293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano34b18112006-02-23 11:21:40303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9d971152012-12-19 00:43:11331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano34b18112006-02-23 11:21:40338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano34b18112006-02-23 11:21:40535
Junio C Hamano34b18112006-02-23 11:21:40536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9d971152012-12-19 00:43:11580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9d971152012-12-19 00:43:11670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9d971152012-12-19 00:43:11703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9d971152012-12-19 00:43:11728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano34b18112006-02-23 11:21:40731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamano34b18112006-02-23 11:21:40733<div id="header">
734<h1>
735git-cvsserver(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-cvsserver -
Junio C Hamano076ffcc2013-02-06 05:13:21740 A CVS server emulator for Git
Junio C Hamano34b18112006-02-23 11:21:40741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano34b18112006-02-23 11:21:40747<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59748<div class="paragraph"><p>SSH:</p></div>
Junio C Hamano34b18112006-02-23 11:21:40749<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11750<pre class="content">export CVS_SERVER="git cvsserver"
751<em>cvs</em> -d :ext:user@server/path/repo.git co &lt;HEAD_name&gt;</pre>
752<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59753</div></div>
754<div class="paragraph"><p>pserver (/etc/inetd.conf):</p></div>
Junio C Hamano6926bef2007-06-16 09:54:05755<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11756<pre class="content">cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver</pre>
757<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59758</div></div>
759<div class="paragraph"><p>Usage:</p></div>
Junio C Hamano6926bef2007-06-16 09:54:05760<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11761<pre class="content"><em>git-cvsserver</em> [options] [pserver|server] [&lt;directory&gt; &#8230;]</pre>
762<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59763</div></div>
Junio C Hamano6926bef2007-06-16 09:54:05764</div>
Junio C Hamano9d971152012-12-19 00:43:11765</div>
766<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31767<h2 id="_options">OPTIONS</h2>
Junio C Hamano6926bef2007-06-16 09:54:05768<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59769<div class="paragraph"><p>All these options obviously only make sense if enforced by the server side.
Junio C Hamanoa28a9202012-06-21 07:08:23770They have been implemented to resemble the <a href="git-daemon.html">git-daemon(1)</a> options as
Junio C Hamanoba4b9282008-07-06 05:20:31771closely as possible.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59772<div class="dlist"><dl>
773<dt class="hdlist1">
Junio C Hamano6926bef2007-06-16 09:54:05774--base-path &lt;path&gt;
775</dt>
776<dd>
777<p>
778Prepend <em>path</em> to requested CVSROOT
779</p>
780</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59781<dt class="hdlist1">
Junio C Hamano6926bef2007-06-16 09:54:05782--strict-paths
783</dt>
784<dd>
785<p>
Junio C Hamano68cf15a2010-11-06 01:01:59786Don&#8217;t allow recursing into subdirectories
Junio C Hamano6926bef2007-06-16 09:54:05787</p>
788</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59789<dt class="hdlist1">
Junio C Hamano6926bef2007-06-16 09:54:05790--export-all
791</dt>
792<dd>
793<p>
Junio C Hamano9d971152012-12-19 00:43:11794Don&#8217;t check for <code>gitcvs.enabled</code> in config. You also have to specify a list
Junio C Hamano6926bef2007-06-16 09:54:05795of allowed directories (see below) if you want to use this option.
796</p>
797</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59798<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47799-V
800</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59801<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47802--version
Junio C Hamano6926bef2007-06-16 09:54:05803</dt>
804<dd>
805<p>
806Print version information and exit
807</p>
808</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59809<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47810-h
811</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59812<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47813-H
814</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59815<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47816--help
Junio C Hamano6926bef2007-06-16 09:54:05817</dt>
818<dd>
819<p>
820Print usage information and exit
821</p>
822</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59823<dt class="hdlist1">
Junio C Hamano6926bef2007-06-16 09:54:05824&lt;directory&gt;
825</dt>
826<dd>
827<p>
828You can specify a list of allowed directories. If no directories
829are given, all are allowed. This is an additional restriction, gitcvs
Junio C Hamano9d971152012-12-19 00:43:11830access still needs to be enabled by the <code>gitcvs.enabled</code> config option
Junio C Hamano6926bef2007-06-16 09:54:05831unless <em>--export-all</em> was given, too.
832</p>
833</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31834</dl></div>
Junio C Hamano34b18112006-02-23 11:21:40835</div>
Junio C Hamano9d971152012-12-19 00:43:11836</div>
837<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31838<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano34b18112006-02-23 11:21:40839<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21840<div class="paragraph"><p>This application is a CVS emulation layer for Git.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59841<div class="paragraph"><p>It is highly functional. However, not all methods are implemented,
Junio C Hamano34b18112006-02-23 11:21:40842and for those methods that are implemented,
Junio C Hamanoba4b9282008-07-06 05:20:31843not all switches are implemented.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59844<div class="paragraph"><p>Testing has been done using both the CLI CVS client, and the Eclipse CVS
Junio C Hamanoba4b9282008-07-06 05:20:31845plugin. Most functionality works fine with both of these clients.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40846</div>
Junio C Hamano9d971152012-12-19 00:43:11847</div>
848<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31849<h2 id="_limitations">LIMITATIONS</h2>
Junio C Hamano34b18112006-02-23 11:21:40850<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21851<div class="paragraph"><p>CVS clients cannot tag, branch or perform Git merges.</p></div>
852<div class="paragraph"><p><em>git-cvsserver</em> maps Git branches to CVS modules. This is very different
Junio C Hamanoa2ad99e2007-04-18 09:57:04853from what most CVS users would expect since in CVS modules usually represent
Junio C Hamanoba4b9282008-07-06 05:20:31854one or more directories.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40855</div>
Junio C Hamano9d971152012-12-19 00:43:11856</div>
857<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31858<h2 id="_installation">INSTALLATION</h2>
Junio C Hamano34b18112006-02-23 11:21:40859<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59860<div class="olist arabic"><ol class="arabic">
Junio C Hamano34b18112006-02-23 11:21:40861<li>
862<p>
Junio C Hamanoa574a092010-06-13 19:57:10863If you are going to offer CVS access via pserver, add a line in
Junio C Hamanodecf50e2006-03-05 10:51:14864 /etc/inetd.conf like
Junio C Hamano34b18112006-02-23 11:21:40865</p>
Junio C Hamano9d971152012-12-19 00:43:11866<div class="openblock">
867<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17868<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14869<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11870<pre><code> cvspserver stream tcp nowait nobody git-cvsserver pserver</code></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14871</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59872<div class="paragraph"><p>Note: Some inetd servers let you specify the name of the executable
Junio C Hamano591dc6a2007-05-29 09:18:19873independently of the value of argv[0] (i.e. the name the program assumes
874it was executed with). In this case the correct line in /etc/inetd.conf
Junio C Hamanoba4b9282008-07-06 05:20:31875looks like</p></div>
Junio C Hamanof1d14802006-06-08 00:48:17876<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14877<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11878<pre><code> cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver</code></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14879</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59880<div class="paragraph"><p>Only anonymous access is provided by pserve by default. To commit you
Junio C Hamanoa574a092010-06-13 19:57:10881will have to create pserver accounts, simply add a gitcvs.authdb
882setting in the config file of the repositories you want the cvsserver
883to allow writes to, for example:</p></div>
884<div class="listingblock">
885<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11886<pre><code> [gitcvs]
887 authdb = /etc/cvsserver/passwd</code></pre>
Junio C Hamanoa574a092010-06-13 19:57:10888</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59889<div class="paragraph"><p>The format of these files is username followed by the crypted password,
Junio C Hamanoa574a092010-06-13 19:57:10890for example:</p></div>
891<div class="listingblock">
892<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11893<pre><code> myuser:$1Oyx5r9mdGZ2
894 myuser:$1$BA)@$vbnMJMDym7tA32AamXrm./</code></pre>
Junio C Hamanoa574a092010-06-13 19:57:10895</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59896<div class="paragraph"><p>You can use the <em>htpasswd</em> facility that comes with Apache to make these
897files, but Apache&#8217;s MD5 crypt method differs from the one used by most C
898library&#8217;s crypt() function, so don&#8217;t use the -m option.</p></div>
899<div class="paragraph"><p>Alternatively you can produce the password with perl&#8217;s crypt() operator:</p></div>
Junio C Hamanoa574a092010-06-13 19:57:10900<div class="listingblock">
901<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11902<pre><code> perl -e 'my ($user, $pass) = @ARGV; printf "%s:%s\n", $user, crypt($user, $pass)' $USER password</code></pre>
Junio C Hamanoa574a092010-06-13 19:57:10903</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59904<div class="paragraph"><p>Then provide your password via the pserver method, for example:</p></div>
Junio C Hamanoa574a092010-06-13 19:57:10905<div class="listingblock">
906<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11907<pre><code> cvs -d:pserver:someuser:somepassword &lt;at&gt; server/path/repo.git co &lt;HEAD_name&gt;</code></pre>
Junio C Hamanoa574a092010-06-13 19:57:10908</div></div>
Junio C Hamano076ffcc2013-02-06 05:13:21909<div class="paragraph"><p>No special setup is needed for SSH access, other than having Git tools
Junio C Hamanodecf50e2006-03-05 10:51:14910in the PATH. If you have clients that do not accept the CVS_SERVER
Junio C Hamano9d971152012-12-19 00:43:11911environment variable, you can rename <em>git-cvsserver</em> to <code>cvs</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59912<div class="paragraph"><p>Note: Newer CVS versions (&gt;= 1.12.11) also support specifying
Junio C Hamanoba4b9282008-07-06 05:20:31913CVS_SERVER directly in CVSROOT like</p></div>
Junio C Hamano591dc6a2007-05-29 09:18:19914<div class="listingblock">
915<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11916<pre><code>cvs -d ":ext;CVS_SERVER=git cvsserver:user@server/path/repo.git" co &lt;HEAD_name&gt;</code></pre>
Junio C Hamano591dc6a2007-05-29 09:18:19917</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59918<div class="paragraph"><p>This has the advantage that it will be saved in your <em>CVS/Root</em> files and
919you don&#8217;t need to worry about always setting the correct environment
920variable. SSH users restricted to <em>git-shell</em> don&#8217;t need to override the default
Junio C Hamano9d971152012-12-19 00:43:11921with CVS_SERVER (and shouldn&#8217;t) as <em>git-shell</em> understands <code>cvs</code> to mean
Junio C Hamanoba4b9282008-07-06 05:20:31922<em>git-cvsserver</em> and pretends that the other end runs the real <em>cvs</em> better.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11923</div></div>
Junio C Hamano34b18112006-02-23 11:21:40924</li>
925<li>
926<p>
927For each repo that you want accessible from CVS you need to edit config in
928 the repo and add the following section.
929</p>
Junio C Hamano9d971152012-12-19 00:43:11930<div class="openblock">
931<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17932<div class="listingblock">
Junio C Hamano34b18112006-02-23 11:21:40933<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11934<pre><code> [gitcvs]
Junio C Hamanof1d14802006-06-08 00:48:17935 enabled=1
936 # optional for debugging
Junio C Hamano9d971152012-12-19 00:43:11937 logfile=/path/to/logfile</code></pre>
Junio C Hamano34b18112006-02-23 11:21:40938</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59939<div class="paragraph"><p>Note: you need to ensure each user that is going to invoke <em>git-cvsserver</em> has
Junio C Hamanoa2ad99e2007-04-18 09:57:04940write access to the log file and to the database (see
941<a href="#dbbackend">Database Backend</a>. If you want to offer write access over
Junio C Hamano076ffcc2013-02-06 05:13:21942SSH, the users of course also need write access to the Git repository itself.</p></div>
943<div class="paragraph"><p>You also need to ensure that each repository is "bare" (without a Git index
Junio C Hamano9d971152012-12-19 00:43:11944file) for <code>cvs commit</code> to work. See <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59945<div class="paragraph" id="configaccessmethod"><p>All configuration variables can also be overridden for a specific method of
Junio C Hamanoa2ad99e2007-04-18 09:57:04946access. Valid method names are "ext" (for SSH access) and "pserver". The
947following example configuration would disable pserver access while still
Junio C Hamanoba4b9282008-07-06 05:20:31948allowing access over SSH.</p></div>
Junio C Hamanoa2ad99e2007-04-18 09:57:04949<div class="listingblock">
950<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11951<pre><code> [gitcvs]
Junio C Hamanoa2ad99e2007-04-18 09:57:04952 enabled=0
953
954 [gitcvs "ext"]
Junio C Hamano9d971152012-12-19 00:43:11955 enabled=1</code></pre>
956</div></div>
Junio C Hamanoa2ad99e2007-04-18 09:57:04957</div></div>
Junio C Hamano34b18112006-02-23 11:21:40958</li>
959<li>
960<p>
Junio C Hamano68cf15a2010-11-06 01:01:59961If you didn&#8217;t specify the CVSROOT/CVS_SERVER directly in the checkout command,
Junio C Hamano33f98432008-04-16 09:10:05962 automatically saving it in your <em>CVS/Root</em> files, then you need to set them
963 explicitly in your environment. CVSROOT should be set as per normal, but the
Junio C Hamano076ffcc2013-02-06 05:13:21964 directory should point at the appropriate Git repo. As above, for SSH clients
Junio C Hamano68cf15a2010-11-06 01:01:59965 <em>not</em> restricted to <em>git-shell</em>, CVS_SERVER should be set to <em>git-cvsserver</em>.
Junio C Hamanodecf50e2006-03-05 10:51:14966</p>
Junio C Hamano9d971152012-12-19 00:43:11967<div class="openblock">
968<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17969<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14970<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11971<pre><code> export CVSROOT=:ext:user@server:/var/git/project.git
972 export CVS_SERVER="git cvsserver"</code></pre>
973</div></div>
Junio C Hamanodecf50e2006-03-05 10:51:14974</div></div>
975</li>
976<li>
977<p>
Junio C Hamano33f98432008-04-16 09:10:05978For SSH clients that will make commits, make sure their server-side
979 .ssh/environment files (or .bashrc, etc., according to their specific shell)
980 export appropriate values for GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL,
981 GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL. For SSH clients whose login
982 shell is bash, .bashrc may be a reasonable alternative.
Junio C Hamano34b18112006-02-23 11:21:40983</p>
984</li>
985<li>
986<p>
Junio C Hamanodecf50e2006-03-05 10:51:14987Clients should now be able to check out the project. Use the CVS <em>module</em>
Junio C Hamano076ffcc2013-02-06 05:13:21988 name to indicate what Git <em>head</em> you want to check out. This also sets the
Junio C Hamano33f98432008-04-16 09:10:05989 name of your newly checked-out directory, unless you tell it otherwise with
Junio C Hamano9d971152012-12-19 00:43:11990 <code>-d &lt;dir_name&gt;</code>. For example, this checks out <em>master</em> branch to the
991 <code>project-master</code> directory:
Junio C Hamano34b18112006-02-23 11:21:40992</p>
Junio C Hamanof1d14802006-06-08 00:48:17993<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14994<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11995<pre><code> cvs co -d project-master master</code></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14996</div></div>
Junio C Hamano34b18112006-02-23 11:21:40997</li>
Junio C Hamanoba4b9282008-07-06 05:20:31998</ol></div>
Junio C Hamano34b18112006-02-23 11:21:40999</div>
Junio C Hamano9d971152012-12-19 00:43:111000</div>
1001<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311002<h2 id="dbbackend">Database Backend</h2>
Junio C Hamanoa2ad99e2007-04-18 09:57:041003<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:211004<div class="paragraph"><p><em>git-cvsserver</em> uses one database per Git head (i.e. CVS module) to
Junio C Hamano9df0c662009-11-23 11:09:271005store information about the repository to maintain consistent
1006CVS revision numbers. The database needs to be
1007updated (i.e. written to) after every commit.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111008<div class="paragraph"><p>If the commit is done directly by using <code>git</code> (as opposed to
Junio C Hamanoba4b9282008-07-06 05:20:311009using <em>git-cvsserver</em>) the update will need to happen on the
1010next repository access by <em>git-cvsserver</em>, independent of
1011access method and requested operation.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591012<div class="paragraph"><p>That means that even if you offer only read access (e.g. by using
Junio C Hamanoba4b9282008-07-06 05:20:311013the pserver method), <em>git-cvsserver</em> should have write access to
Junio C Hamanoa2ad99e2007-04-18 09:57:041014the database to work reliably (otherwise you need to make sure
Junio C Hamanoba4b9282008-07-06 05:20:311015that the database is up-to-date any time <em>git-cvsserver</em> is executed).</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:211016<div class="paragraph"><p>By default it uses SQLite databases in the Git directory, named
Junio C Hamano9d971152012-12-19 00:43:111017<code>gitcvs.&lt;module_name&gt;.sqlite</code>. Note that the SQLite backend creates
Junio C Hamanoa2ad99e2007-04-18 09:57:041018temporary files in the same directory as the database file on
1019write so it might not be enough to grant the users using
Junio C Hamanoba4b9282008-07-06 05:20:311020<em>git-cvsserver</em> write access to the database file without granting
1021them write access to the directory, too.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591022<div class="paragraph"><p>The database can not be reliably regenerated in a
Junio C Hamano9df0c662009-11-23 11:09:271023consistent form after the branch it is tracking has changed.
1024Example: For merged branches, <em>git-cvsserver</em> only tracks
Junio C Hamano1aa40d22010-01-21 17:46:431025one branch of development, and after a <em>git merge</em> an
Junio C Hamano9df0c662009-11-23 11:09:271026incrementally updated database may track a different branch
1027than a database regenerated from scratch, causing inconsistent
Junio C Hamano9d971152012-12-19 00:43:111028CVS revision numbers. <code>git-cvsserver</code> has no way of knowing which
Junio C Hamano9df0c662009-11-23 11:09:271029branch it would have picked if it had been run incrementally
1030pre-merge. So if you have to fully or partially (from old
1031backup) regenerate the database, you should be suspicious
1032of pre-existing CVS sandboxes.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591033<div class="paragraph"><p>You can configure the database backend with the following
Junio C Hamanoba4b9282008-07-06 05:20:311034configuration variables:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111035<div class="sect2">
1036<h3 id="_configuring_database_backend">Configuring database backend</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591037<div class="paragraph"><p><em>git-cvsserver</em> uses the Perl DBI module. Please also read
Junio C Hamanoa2ad99e2007-04-18 09:57:041038its documentation if changing these variables, especially
Junio C Hamano9d971152012-12-19 00:43:111039about <code>DBI-&gt;connect()</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591040<div class="dlist"><dl>
1041<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041042gitcvs.dbname
1043</dt>
1044<dd>
1045<p>
1046 Database name. The exact meaning depends on the
Junio C Hamano1f511962008-01-30 08:28:521047 selected database driver, for SQLite this is a filename.
Junio C Hamanoa2ad99e2007-04-18 09:57:041048 Supports variable substitution (see below). May
Junio C Hamano9d971152012-12-19 00:43:111049 not contain semicolons (<code>;</code>).
Junio C Hamanoa2ad99e2007-04-18 09:57:041050 Default: <em>%Ggitcvs.%m.sqlite</em>
1051</p>
1052</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591053<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041054gitcvs.dbdriver
1055</dt>
1056<dd>
1057<p>
1058 Used DBI driver. You can specify any available driver
1059 for this here, but it might not work. cvsserver is tested
1060 with <em>DBD::SQLite</em>, reported to work with
1061 <em>DBD::Pg</em>, and reported <strong>not</strong> to work with <em>DBD::mysql</em>.
1062 Please regard this as an experimental feature. May not
Junio C Hamano9d971152012-12-19 00:43:111063 contain colons (<code>:</code>).
Junio C Hamanoa2ad99e2007-04-18 09:57:041064 Default: <em>SQLite</em>
1065</p>
1066</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591067<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041068gitcvs.dbuser
1069</dt>
1070<dd>
1071<p>
Junio C Hamano9d971152012-12-19 00:43:111072 Database user. Only useful if setting <code>dbdriver</code>, since
Junio C Hamanoa2ad99e2007-04-18 09:57:041073 SQLite has no concept of database users. Supports variable
1074 substitution (see below).
1075</p>
1076</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591077<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041078gitcvs.dbpass
1079</dt>
1080<dd>
1081<p>
Junio C Hamano9d971152012-12-19 00:43:111082 Database password. Only useful if setting <code>dbdriver</code>, since
Junio C Hamanoa2ad99e2007-04-18 09:57:041083 SQLite has no concept of database passwords.
1084</p>
1085</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591086<dt class="hdlist1">
Junio C Hamanoa74efce2008-04-02 08:39:081087gitcvs.dbTableNamePrefix
1088</dt>
1089<dd>
1090<p>
1091 Database table name prefix. Supports variable substitution
1092 (see below). Any non-alphabetic characters will be replaced
1093 with underscores.
1094</p>
1095</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311096</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591097<div class="paragraph"><p>All variables can also be set per access method, see <a href="#configaccessmethod">above</a>.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111098<div class="sect3">
Junio C Hamanoba4b9282008-07-06 05:20:311099<h4 id="_variable_substitution">Variable substitution</h4>
Junio C Hamano9d971152012-12-19 00:43:111100<div class="paragraph"><p>In <code>dbdriver</code> and <code>dbuser</code> you can use the following variables:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591101<div class="dlist"><dl>
1102<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041103%G
1104</dt>
1105<dd>
1106<p>
Junio C Hamano076ffcc2013-02-06 05:13:211107 Git directory name
Junio C Hamanoa2ad99e2007-04-18 09:57:041108</p>
1109</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591110<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041111%g
1112</dt>
1113<dd>
1114<p>
Junio C Hamano076ffcc2013-02-06 05:13:211115 Git directory name, where all characters except for
Junio C Hamano9d971152012-12-19 00:43:111116 alpha-numeric ones, <code>.</code>, and <code>-</code> are replaced with
1117 <code>_</code> (this should make it easier to use the directory
Junio C Hamanoa2ad99e2007-04-18 09:57:041118 name in a filename if wanted)
1119</p>
1120</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591121<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041122%m
1123</dt>
1124<dd>
1125<p>
Junio C Hamano076ffcc2013-02-06 05:13:211126 CVS module/Git head name
Junio C Hamanoa2ad99e2007-04-18 09:57:041127</p>
1128</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591129<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041130%a
1131</dt>
1132<dd>
1133<p>
1134 access method (one of "ext" or "pserver")
1135</p>
1136</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591137<dt class="hdlist1">
Junio C Hamanoa2ad99e2007-04-18 09:57:041138%u
1139</dt>
1140<dd>
1141<p>
Junio C Hamanoba4b9282008-07-06 05:20:311142 Name of the user running <em>git-cvsserver</em>.
Junio C Hamanoa2ad99e2007-04-18 09:57:041143 If no name can be determined, the
1144 numeric uid is used.
1145</p>
1146</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311147</dl></div>
Junio C Hamanoa2ad99e2007-04-18 09:57:041148</div>
Junio C Hamano9d971152012-12-19 00:43:111149</div>
1150</div>
1151</div>
1152<div class="sect1">
Junio C Hamanob141a922010-01-10 19:55:141153<h2 id="_environment">ENVIRONMENT</h2>
1154<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591155<div class="paragraph"><p>These variables obviate the need for command-line options in some
Junio C Hamanob141a922010-01-10 19:55:141156circumstances, allowing easier restricted usage through git-shell.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591157<div class="paragraph"><p>GIT_CVSSERVER_BASE_PATH takes the place of the argument to --base-path.</p></div>
1158<div class="paragraph"><p>GIT_CVSSERVER_ROOT specifies a single-directory whitelist. The
Junio C Hamanob141a922010-01-10 19:55:141159repository must still be configured to allow access through
1160git-cvsserver, as described above.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591161<div class="paragraph"><p>When these environment variables are set, the corresponding
Junio C Hamanob141a922010-01-10 19:55:141162command-line arguments may not be used.</p></div>
1163</div>
Junio C Hamano9d971152012-12-19 00:43:111164</div>
1165<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311166<h2 id="_eclipse_cvs_client_notes">Eclipse CVS Client Notes</h2>
Junio C Hamano9512fcf2006-03-01 12:05:141167<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591168<div class="paragraph"><p>To get a checkout with the Eclipse CVS client:</p></div>
1169<div class="olist arabic"><ol class="arabic">
Junio C Hamano9512fcf2006-03-01 12:05:141170<li>
1171<p>
Junio C Hamano68cf15a2010-11-06 01:01:591172Select "Create a new project &#8594; From CVS checkout"
Junio C Hamano9512fcf2006-03-01 12:05:141173</p>
1174</li>
1175<li>
1176<p>
Junio C Hamanodecf50e2006-03-05 10:51:141177Create a new location. See the notes below for details on how to choose the
1178 right protocol.
Junio C Hamano9512fcf2006-03-01 12:05:141179</p>
1180</li>
1181<li>
1182<p>
Junio C Hamanodecf50e2006-03-05 10:51:141183Browse the <em>modules</em> available. It will give you a list of the heads in
1184 the repository. You will not be able to browse the tree from there. Only
1185 the heads.
Junio C Hamano9512fcf2006-03-01 12:05:141186</p>
1187</li>
1188<li>
1189<p>
Junio C Hamanodecf50e2006-03-05 10:51:141190Pick <em>HEAD</em> when it asks what branch/tag to check out. Untick the
1191 "launch commit wizard" to avoid committing the .project file.
Junio C Hamano9512fcf2006-03-01 12:05:141192</p>
1193</li>
Junio C Hamanoba4b9282008-07-06 05:20:311194</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:591195<div class="paragraph"><p>Protocol notes: If you are using anonymous access via pserver, just select that.
Junio C Hamanodecf50e2006-03-05 10:51:141196Those using SSH access should choose the <em>ext</em> protocol, and configure <em>ext</em>
Junio C Hamano68cf15a2010-11-06 01:01:591197access on the Preferences&#8594;Team&#8594;CVS&#8594;ExtConnection pane. Set CVS_SERVER to
Junio C Hamano9d971152012-12-19 00:43:111198"<code>git cvsserver</code>". Note that password support is not good when using <em>ext</em>,
Junio C Hamanoba4b9282008-07-06 05:20:311199you will definitely want to have SSH keys setup.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591200<div class="paragraph"><p>Alternatively, you can just use the non-standard extssh protocol that Eclipse
Junio C Hamanodecf50e2006-03-05 10:51:141201offer. In that case CVS_SERVER is ignored, and you will have to replace
Junio C Hamano9d971152012-12-19 00:43:111202the cvs utility on the server with <em>git-cvsserver</em> or manipulate your <code>.bashrc</code>
Junio C Hamanoba4b9282008-07-06 05:20:311203so that calling <em>cvs</em> effectively calls <em>git-cvsserver</em>.</p></div>
Junio C Hamano9512fcf2006-03-01 12:05:141204</div>
Junio C Hamano9d971152012-12-19 00:43:111205</div>
1206<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311207<h2 id="_clients_known_to_work">Clients known to work</h2>
Junio C Hamano9512fcf2006-03-01 12:05:141208<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591209<div class="ulist"><ul>
Junio C Hamano103ad7f2007-03-14 11:19:261210<li>
1211<p>
1212CVS 1.12.9 on Debian
1213</p>
1214</li>
1215<li>
1216<p>
Junio C Hamano9512fcf2006-03-01 12:05:141217CVS 1.11.17 on MacOSX (from Fink package)
Junio C Hamano103ad7f2007-03-14 11:19:261218</p>
1219</li>
1220<li>
1221<p>
Junio C Hamano9512fcf2006-03-01 12:05:141222Eclipse 3.0, 3.1.2 on MacOSX (see Eclipse CVS Client Notes)
Junio C Hamano103ad7f2007-03-14 11:19:261223</p>
1224</li>
1225<li>
1226<p>
1227TortoiseCVS
1228</p>
1229</li>
Junio C Hamanoba4b9282008-07-06 05:20:311230</ul></div>
Junio C Hamano9512fcf2006-03-01 12:05:141231</div>
Junio C Hamano9d971152012-12-19 00:43:111232</div>
1233<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311234<h2 id="_operations_supported">Operations supported</h2>
Junio C Hamano34b18112006-02-23 11:21:401235<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591236<div class="paragraph"><p>All the operations required for normal use are supported, including
Junio C Hamano36d52292013-01-25 21:32:361237checkout, diff, status, update, log, add, remove, commit.</p></div>
1238<div class="paragraph"><p>Most CVS command arguments that read CVS tags or revision numbers
1239(typically -r) work, and also support any git refspec
1240(tag, branch, commit ID, etc).
1241However, CVS revision numbers for non-default branches are not well
1242emulated, and cvs log does not show tags or branches at
1243all. (Non-main-branch CVS revision numbers superficially resemble CVS
1244revision numbers, but they actually encode a git commit ID directly,
1245rather than represent the number of revisions since the branch point.)</p></div>
1246<div class="paragraph"><p>Note that there are two ways to checkout a particular branch.
1247As described elsewhere on this page, the "module" parameter
1248of cvs checkout is interpreted as a branch name, and it becomes
1249the main branch. It remains the main branch for a given sandbox
1250even if you temporarily make another branch sticky with
1251cvs update -r. Alternatively, the -r argument can indicate
1252some other branch to actually checkout, even though the module
1253is still the "main" branch. Tradeoffs (as currently
1254implemented): Each new "module" creates a new database on disk with
1255a history for the given module, and after the database is created,
1256operations against that main branch are fast. Or alternatively,
1257-r doesn&#8217;t take any extra disk space, but may be significantly slower for
1258many operations, like cvs update.</p></div>
1259<div class="paragraph"><p>If you want to refer to a git refspec that has characters that are
1260not allowed by CVS, you have two options. First, it may just work
1261to supply the git refspec directly to the appropriate CVS -r argument;
1262some CVS clients don&#8217;t seem to do much sanity checking of the argument.
1263Second, if that fails, you can use a special character escape mechanism
1264that only uses characters that are valid in CVS tags. A sequence
1265of 4 or 5 characters of the form (underscore (<code>"_"</code>), dash (<code>"-"</code>),
1266one or two characters, and dash (<code>"-"</code>)) can encode various characters based
1267on the one or two letters: <code>"s"</code> for slash (<code>"/"</code>), <code>"p"</code> for
1268period (<code>"."</code>), <code>"u"</code> for underscore (<code>"_"</code>), or two hexadecimal digits
1269for any byte value at all (typically an ASCII number, or perhaps a part
1270of a UTF-8 encoded character).</p></div>
1271<div class="paragraph"><p>Legacy monitoring operations are not supported (edit, watch and related).
Junio C Hamanoba4b9282008-07-06 05:20:311272Exports and tagging (tags and branches) are not supported at this stage.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111273<div class="sect2">
1274<h3 id="_crlf_line_ending_conversions">CRLF Line Ending Conversions</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591275<div class="paragraph"><p>By default the server leaves the <em>-k</em> mode blank for all files,
Junio C Hamano619596a2010-08-18 22:15:351276which causes the CVS client to treat them as a text files, subject
1277to end-of-line conversion on some platforms.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591278<div class="paragraph"><p>You can make the server use the end-of-line conversion attributes to
Junio C Hamano9d971152012-12-19 00:43:111279set the <em>-k</em> modes for files by setting the <code>gitcvs.usecrlfattr</code>
Junio C Hamanoa28a9202012-06-21 07:08:231280config variable. See <a href="gitattributes.html">gitattributes(5)</a> for more information
Junio C Hamanobb88cf42010-06-21 15:23:551281about end-of-line conversion.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111282<div class="paragraph"><p>Alternatively, if <code>gitcvs.usecrlfattr</code> config is not enabled
Junio C Hamanobb88cf42010-06-21 15:23:551283or the attributes do not allow automatic detection for a filename, then
Junio C Hamano9d971152012-12-19 00:43:111284the server uses the <code>gitcvs.allbinary</code> config for the default setting.
1285If <code>gitcvs.allbinary</code> is set, then file not otherwise
Junio C Hamanodfccbb02008-05-26 01:16:141286specified will default to <em>-kb</em> mode. Otherwise the <em>-k</em> mode
Junio C Hamano9d971152012-12-19 00:43:111287is left blank. But if <code>gitcvs.allbinary</code> is set to "guess", then
Junio C Hamanodfccbb02008-05-26 01:16:141288the correct <em>-k</em> mode will be guessed based on the contents of
Junio C Hamanoba4b9282008-07-06 05:20:311289the file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591290<div class="paragraph"><p>For best consistency with <em>cvs</em>, it is probably best to override the
Junio C Hamano9d971152012-12-19 00:43:111291defaults by setting <code>gitcvs.usecrlfattr</code> to true,
1292and <code>gitcvs.allbinary</code> to "guess".</p></div>
Junio C Hamano34b18112006-02-23 11:21:401293</div>
Junio C Hamano9d971152012-12-19 00:43:111294</div>
1295</div>
1296<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311297<h2 id="_dependencies">Dependencies</h2>
Junio C Hamano34b18112006-02-23 11:21:401298<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591299<div class="paragraph"><p><em>git-cvsserver</em> depends on DBD::SQLite.</p></div>
Junio C Hamano34b18112006-02-23 11:21:401300</div>
Junio C Hamano9d971152012-12-19 00:43:111301</div>
1302<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311303<h2 id="_git">GIT</h2>
Junio C Hamano34b18112006-02-23 11:21:401304<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231305<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano34b18112006-02-23 11:21:401306</div>
Junio C Hamano7bd050f2011-09-22 06:32:221307</div>
Junio C Hamano9d971152012-12-19 00:43:111308</div>
Junio C Hamano7bd050f2011-09-22 06:32:221309<div id="footnotes"><hr /></div>
Junio C Hamano34b18112006-02-23 11:21:401310<div id="footer">
1311<div id="footer-text">
Junio C Hamano683a8612013-08-23 20:50:091312Last updated 2013-08-20 08:40:27 PDT
Junio C Hamano34b18112006-02-23 11:21:401313</div>
1314</div>
1315</body>
1316</html>