blob: 612b241595374bac162d59357b29c809f72f5e53 [file] [log] [blame]
Junio C Hamano944ce252018-05-30 22:25:261<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamanof2b74942012-11-20 21:06:262<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5<head>
Junio C Hamano9d971152012-12-19 00:43:116<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamanoeaa95f72020-04-14 17:39:357<meta name="generator" content="AsciiDoc 9.0.0rc1" />
Junio C Hamano076ffcc2013-02-06 05:13:218<title>Git index format</title>
Junio C Hamanof2b74942012-11-20 21:06:269<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:1110/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11
12/* Default font. */
13body {
14 font-family: Georgia,serif;
15}
16
17/* Title font. */
18h1, h2, h3, h4, h5, h6,
19div.title, caption.title,
20thead, p.table.header,
21#toctitle,
22#author, #revnumber, #revdate, #revremark,
23#footer {
24 font-family: Arial,Helvetica,sans-serif;
Junio C Hamanof2b74942012-11-20 21:06:2625}
26
27body {
28 margin: 1em 5% 1em 5%;
29}
30
31a {
32 color: blue;
33 text-decoration: underline;
34}
35a:visited {
36 color: fuchsia;
37}
38
39em {
40 font-style: italic;
41 color: navy;
42}
43
44strong {
45 font-weight: bold;
46 color: #083194;
47}
48
Junio C Hamanof2b74942012-11-20 21:06:2649h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:2651 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
54}
55
56h1, h2, h3 {
57 border-bottom: 2px solid silver;
58}
59h2 {
60 padding-top: 0.5em;
61}
62h3 {
63 float: left;
64}
65h3 + * {
66 clear: left;
67}
Junio C Hamano9d971152012-12-19 00:43:1168h5 {
69 font-size: 1.0em;
70}
Junio C Hamanof2b74942012-11-20 21:06:2671
72div.sectionbody {
Junio C Hamanof2b74942012-11-20 21:06:2673 margin-left: 0;
74}
75
76hr {
77 border: 1px solid silver;
78}
79
80p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
83}
84
85ul, ol, li > p {
86 margin-top: 0;
87}
Junio C Hamano9d971152012-12-19 00:43:1188ul > li { color: #aaa; }
89ul > li > * { color: black; }
Junio C Hamanof2b74942012-11-20 21:06:2690
Junio C Hamanoc14e6ad2014-10-31 20:25:5391.monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
Junio C Hamanof2b74942012-11-20 21:06:2695 padding: 0;
96 margin: 0;
97}
Junio C Hamanoc14e6ad2014-10-31 20:25:5398pre {
99 white-space: pre-wrap;
100}
Junio C Hamanof2b74942012-11-20 21:06:26101
Junio C Hamano9d971152012-12-19 00:43:11102#author {
Junio C Hamanof2b74942012-11-20 21:06:26103 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26104 font-weight: bold;
105 font-size: 1.1em;
106}
Junio C Hamano9d971152012-12-19 00:43:11107#email {
Junio C Hamanof2b74942012-11-20 21:06:26108}
Junio C Hamano9d971152012-12-19 00:43:11109#revnumber, #revdate, #revremark {
Junio C Hamanof2b74942012-11-20 21:06:26110}
111
Junio C Hamano9d971152012-12-19 00:43:11112#footer {
Junio C Hamanof2b74942012-11-20 21:06:26113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
117}
Junio C Hamano9d971152012-12-19 00:43:11118#footer-text {
Junio C Hamanof2b74942012-11-20 21:06:26119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9d971152012-12-19 00:43:11122#footer-badges {
Junio C Hamanof2b74942012-11-20 21:06:26123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9d971152012-12-19 00:43:11127#preamble {
Junio C Hamanof2b74942012-11-20 21:06:26128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
130}
Junio C Hamano9d971152012-12-19 00:43:11131div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamanof2b74942012-11-20 21:06:26132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
134 margin-top: 1.0em;
135 margin-bottom: 1.5em;
136}
137div.admonitionblock {
138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
150 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
155}
156div.title + * {
157 margin-top: 0;
158}
159
160td div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content div.title:first-child {
164 margin-top: 0.0em;
165}
166div.content + div.title {
167 margin-top: 0.0em;
168}
169
170div.sidebarblock > div.content {
171 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
Junio C Hamanof2b74942012-11-20 21:06:26174 padding: 0.5em;
175}
176
177div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
Junio C Hamanof2b74942012-11-20 21:06:26181 padding: 0.5em;
182}
183
184div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
187 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamanof2b74942012-11-20 21:06:26190}
191
192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
194 text-align: right;
195}
196
Junio C Hamano9d971152012-12-19 00:43:11197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamanof2b74942012-11-20 21:06:26200}
201div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
204}
205/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
206div.verseblock + div.attribution {
207 text-align: left;
208}
209
210div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
217}
218div.admonitionblock td.content {
219 padding-left: 0.5em;
220 border-left: 3px solid #dddddd;
221}
222
223div.exampleblock > div.content {
224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
226}
227
228div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc14e6ad2014-10-31 20:25:53229span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamanof2b74942012-11-20 21:06:26230a.image:visited { color: white; }
231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
239 font-style: normal;
240 color: navy;
241}
242dd > *:first-child {
243 margin-top: 0.1em;
244}
245
246ul, ol {
247 list-style-position: outside;
248}
249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
253 list-style-type: lower-alpha;
254}
255ol.upperalpha {
256 list-style-type: upper-alpha;
257}
258ol.lowerroman {
259 list-style-type: lower-roman;
260}
261ol.upperroman {
262 list-style-type: upper-roman;
263}
264
265div.compact ul, div.compact ol,
266div.compact p, div.compact p,
267div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
270}
271
Junio C Hamanof2b74942012-11-20 21:06:26272tfoot {
273 font-weight: bold;
274}
275td > div.verse {
276 white-space: pre;
277}
Junio C Hamanof2b74942012-11-20 21:06:26278
279div.hdlist {
280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
283div.hdlist tr {
284 padding-bottom: 15px;
285}
286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
290 vertical-align: top;
291 font-style: normal;
292 padding-right: 0.8em;
293 color: navy;
294}
295td.hdlist2 {
296 vertical-align: top;
297}
298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
306
307.footnote, .footnoteref {
308 font-size: 0.8em;
309}
310
311span.footnote, span.footnoteref {
312 vertical-align: super;
313}
314
315#footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
318}
319
320#footnotes div.footnote {
321 margin: 0 0 5px 0;
322}
323
324#footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
332}
333
Junio C Hamano9d971152012-12-19 00:43:11334div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
338}
339div.colist td img {
340 margin-top: 0.3em;
Junio C Hamanof2b74942012-11-20 21:06:26341}
342
Junio C Hamano9d971152012-12-19 00:43:11343@media print {
344 #footer-badges { display: none; }
345}
346
347#toc {
Junio C Hamanof2b74942012-11-20 21:06:26348 margin-bottom: 2.5em;
349}
350
Junio C Hamano9d971152012-12-19 00:43:11351#toctitle {
Junio C Hamanof2b74942012-11-20 21:06:26352 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
357}
358
Junio C Hamanoc14e6ad2014-10-31 20:25:53359div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanof2b74942012-11-20 21:06:26360 margin-top: 0;
361 margin-bottom: 0;
362}
363div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
366}
367div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
370}
371div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
374}
Junio C Hamanof2b74942012-11-20 21:06:26375
Junio C Hamano9d971152012-12-19 00:43:11376span.aqua { color: aqua; }
377span.black { color: black; }
378span.blue { color: blue; }
379span.fuchsia { color: fuchsia; }
380span.gray { color: gray; }
381span.green { color: green; }
382span.lime { color: lime; }
383span.maroon { color: maroon; }
384span.navy { color: navy; }
385span.olive { color: olive; }
386span.purple { color: purple; }
387span.red { color: red; }
388span.silver { color: silver; }
389span.teal { color: teal; }
390span.white { color: white; }
391span.yellow { color: yellow; }
392
393span.aqua-background { background: aqua; }
394span.black-background { background: black; }
395span.blue-background { background: blue; }
396span.fuchsia-background { background: fuchsia; }
397span.gray-background { background: gray; }
398span.green-background { background: green; }
399span.lime-background { background: lime; }
400span.maroon-background { background: maroon; }
401span.navy-background { background: navy; }
402span.olive-background { background: olive; }
403span.purple-background { background: purple; }
404span.red-background { background: red; }
405span.silver-background { background: silver; }
406span.teal-background { background: teal; }
407span.white-background { background: white; }
408span.yellow-background { background: yellow; }
409
410span.big { font-size: 2em; }
411span.small { font-size: 0.6em; }
412
413span.underline { text-decoration: underline; }
414span.overline { text-decoration: overline; }
415span.line-through { text-decoration: line-through; }
416
Junio C Hamanoc14e6ad2014-10-31 20:25:53417div.unbreakable { page-break-inside: avoid; }
418
Junio C Hamano9d971152012-12-19 00:43:11419
420/*
421 * xhtml11 specific
422 *
423 * */
424
425div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
Junio C Hamanof2b74942012-11-20 21:06:26428}
Junio C Hamano9d971152012-12-19 00:43:11429div.tableblock > table {
430 border: 3px solid #527bbd;
431}
432thead, p.table.header {
Junio C Hamanof2b74942012-11-20 21:06:26433 font-weight: bold;
Junio C Hamano9d971152012-12-19 00:43:11434 color: #527bbd;
435}
436p.table {
437 margin-top: 0;
438}
Junio C Hamano725b0da2020-01-22 22:02:40439/* Because the table frame attribute is overridden by CSS in most browsers. */
Junio C Hamano9d971152012-12-19 00:43:11440div.tableblock > table[frame="void"] {
441 border-style: none;
442}
443div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
446}
447div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
Junio C Hamanof2b74942012-11-20 21:06:26450}
451
Junio C Hamano9d971152012-12-19 00:43:11452
453/*
454 * html5 specific
455 *
456 * */
457
458table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
461}
462thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
465}
466p.tableblock {
467 margin-top: 0;
468}
469table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
475}
476th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26481}
482
Junio C Hamano9d971152012-12-19 00:43:11483table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
486}
487table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
490}
491table.tableblock.frame-none {
492 border-style: hidden;
493}
494
495th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
497}
498th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
500}
501th.tableblock.halign-right, td.tableblock.halign-right {
Junio C Hamanof2b74942012-11-20 21:06:26502 text-align: right;
503}
504
Junio C Hamano9d971152012-12-19 00:43:11505th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
Junio C Hamanof2b74942012-11-20 21:06:26507}
Junio C Hamano9d971152012-12-19 00:43:11508th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
510}
511th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
Junio C Hamanof2b74942012-11-20 21:06:26513}
514
Junio C Hamano9d971152012-12-19 00:43:11515
516/*
517 * manpage specific
518 *
519 * */
520
521body.manpage h1 {
522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
526}
527body.manpage h2 {
528 border-style: none;
529}
530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamanof2b74942012-11-20 21:06:26532}
533
Junio C Hamano9d971152012-12-19 00:43:11534@media print {
535 body.manpage div#toc { display: none; }
536}
Junio C Hamanoc14e6ad2014-10-31 20:25:53537
538
Junio C Hamanof2b74942012-11-20 21:06:26539</style>
540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamanof2b74942012-11-20 21:06:26542var asciidoc = { // Namespace.
543
544/////////////////////////////////////////////////////////////////////
545// Table Of Contents generator
546/////////////////////////////////////////////////////////////////////
547
548/* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
550 *
551 * Table Of Content generator
552 * Version: 0.4
553 *
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
556 */
557
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
560
561// toclevels = 1..4.
562toc: function (toclevels) {
563
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
571 }
572 return text;
573 }
574
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
579 }
580
581 function tocEntries(el, toclevels) {
582 var result = new Array;
Junio C Hamanoc14e6ad2014-10-31 20:25:53583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamanof2b74942012-11-20 21:06:26584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
593 }
594 iterate(i);
595 }
596 }
597 }
598 iterate(el);
599 return result;
600 }
601
602 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11603 if (!toc) {
604 return;
605 }
606
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53612 if (entry.nodeName.toLowerCase() == 'div'
Junio C Hamano9d971152012-12-19 00:43:11613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
616 }
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
619 }
620
621 // Rebuild TOC entries.
Junio C Hamanof2b74942012-11-20 21:06:26622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
634 }
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
637},
638
639
640/////////////////////////////////////////////////////////////////////
641// Footnotes generator
642/////////////////////////////////////////////////////////////////////
643
644/* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
646 */
647
648footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
Junio C Hamanof2b74942012-11-20 21:06:26651 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9d971152012-12-19 00:43:11659 entriesToRemove.push(entry);
660 }
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
663 }
664
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
Junio C Hamanof2b74942012-11-20 21:06:26667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
Junio C Hamano9d971152012-12-19 00:43:11673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
682 }
Junio C Hamanof2b74942012-11-20 21:06:26683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
Junio C Hamanof2b74942012-11-20 21:06:26687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
689 }
690 }
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
703 }
704 }
705 }
Junio C Hamano9d971152012-12-19 00:43:11706},
707
708install: function(toclevels) {
709 var timerId;
710
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
715 }
716 }
717
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
721 }
722
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
Junio C Hamanof2b74942012-11-20 21:06:26728}
729
730}
Junio C Hamano9d971152012-12-19 00:43:11731asciidoc.install();
Junio C Hamanof2b74942012-11-20 21:06:26732/*]]>*/
733</script>
734</head>
Junio C Hamano9d971152012-12-19 00:43:11735<body class="article">
Junio C Hamanof2b74942012-11-20 21:06:26736<div id="header">
Junio C Hamano076ffcc2013-02-06 05:13:21737<h1>Git index format</h1>
Junio C Hamanof2b74942012-11-20 21:06:26738</div>
739<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11740<div class="sect1">
Junio C Hamano076ffcc2013-02-06 05:13:21741<h2 id="_the_git_index_file_has_the_following_format">The Git index file has the following format</h2>
Junio C Hamanof2b74942012-11-20 21:06:26742<div class="sectionbody">
743<div class="literalblock">
744<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53745<pre><code>All binary numbers are in network byte order. Version 2 is described
746here unless stated otherwise.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26747</div></div>
748<div class="ulist"><ul>
749<li>
750<p>
751A 12-byte header consisting of
752</p>
753<div class="literalblock">
754<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53755<pre><code>4-byte signature:
756 The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26757</div></div>
758<div class="literalblock">
759<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53760<pre><code>4-byte version number:
761 The current supported versions are 2, 3 and 4.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26762</div></div>
763<div class="literalblock">
764<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53765<pre><code>32-bit number of index entries.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26766</div></div>
767</li>
768<li>
769<p>
770A number of sorted index entries (see below).
771</p>
772</li>
773<li>
774<p>
775Extensions
776</p>
777<div class="literalblock">
778<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53779<pre><code>Extensions are identified by signature. Optional extensions can
780be ignored if Git does not understand them.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26781</div></div>
782<div class="literalblock">
783<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53784<pre><code>Git currently supports cached tree and resolve undo extensions.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26785</div></div>
786<div class="literalblock">
787<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53788<pre><code>4-byte extension signature. If the first byte is 'A'..'Z' the
789extension is optional and can be ignored.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26790</div></div>
791<div class="literalblock">
792<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53793<pre><code>32-bit size of the extension</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26794</div></div>
795<div class="literalblock">
796<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53797<pre><code>Extension data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26798</div></div>
799</li>
800<li>
801<p>
802160-bit SHA-1 over the content of the index file before this
803 checksum.
804</p>
805</li>
806</ul></div>
807</div>
Junio C Hamano9d971152012-12-19 00:43:11808</div>
809<div class="sect1">
Junio C Hamanof2b74942012-11-20 21:06:26810<h2 id="_index_entry">Index entry</h2>
811<div class="sectionbody">
812<div class="literalblock">
813<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53814<pre><code>Index entries are sorted in ascending order on the name field,
Junio C Hamanof2b74942012-11-20 21:06:26815interpreted as a string of unsigned bytes (i.e. memcmp() order, no
816localization, no special casing of directory separator '/'). Entries
Junio C Hamanoc14e6ad2014-10-31 20:25:53817with the same name are sorted by their stage field.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26818</div></div>
819<div class="literalblock">
820<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53821<pre><code>32-bit ctime seconds, the last time a file's metadata changed
822 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26823</div></div>
824<div class="literalblock">
825<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53826<pre><code>32-bit ctime nanosecond fractions
827 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26828</div></div>
829<div class="literalblock">
830<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53831<pre><code>32-bit mtime seconds, the last time a file's data changed
832 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26833</div></div>
834<div class="literalblock">
835<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53836<pre><code>32-bit mtime nanosecond fractions
837 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26838</div></div>
839<div class="literalblock">
840<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53841<pre><code>32-bit dev
842 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26843</div></div>
844<div class="literalblock">
845<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53846<pre><code>32-bit ino
847 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26848</div></div>
849<div class="literalblock">
850<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53851<pre><code>32-bit mode, split into (high to low bits)</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26852</div></div>
853<div class="literalblock">
854<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53855<pre><code>4-bit object type
Junio C Hamanof2b74942012-11-20 21:06:26856 valid values in binary are 1000 (regular file), 1010 (symbolic link)
Junio C Hamanoc14e6ad2014-10-31 20:25:53857 and 1110 (gitlink)</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26858</div></div>
859<div class="literalblock">
860<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53861<pre><code>3-bit unused</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26862</div></div>
863<div class="literalblock">
864<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53865<pre><code>9-bit unix permission. Only 0755 and 0644 are valid for regular files.
866Symbolic links and gitlinks have value 0 in this field.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26867</div></div>
868<div class="literalblock">
869<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53870<pre><code>32-bit uid
871 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26872</div></div>
873<div class="literalblock">
874<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53875<pre><code>32-bit gid
876 this is stat(2) data</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26877</div></div>
878<div class="literalblock">
879<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53880<pre><code>32-bit file size
881 This is the on-disk size from stat(2), truncated to 32-bit.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26882</div></div>
883<div class="literalblock">
884<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53885<pre><code>160-bit SHA-1 for the represented object</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26886</div></div>
887<div class="literalblock">
888<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53889<pre><code>A 16-bit 'flags' field split into (high to low bits)</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26890</div></div>
891<div class="literalblock">
892<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53893<pre><code>1-bit assume-valid flag</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26894</div></div>
895<div class="literalblock">
896<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53897<pre><code>1-bit extended flag (must be zero in version 2)</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26898</div></div>
899<div class="literalblock">
900<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53901<pre><code>2-bit stage (during merge)</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26902</div></div>
903<div class="literalblock">
904<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53905<pre><code>12-bit name length if the length is less than 0xFFF; otherwise 0xFFF
906is stored in this field.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26907</div></div>
908<div class="literalblock">
909<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53910<pre><code>(Version 3 or later) A 16-bit field, only applicable if the
911"extended flag" above is 1, split into (high to low bits).</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26912</div></div>
913<div class="literalblock">
914<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53915<pre><code>1-bit reserved for future</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26916</div></div>
917<div class="literalblock">
918<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53919<pre><code>1-bit skip-worktree flag (used by sparse checkout)</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26920</div></div>
921<div class="literalblock">
922<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53923<pre><code>1-bit intent-to-add flag (used by "git add -N")</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26924</div></div>
925<div class="literalblock">
926<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53927<pre><code>13-bit unused, must be zero</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26928</div></div>
929<div class="literalblock">
930<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53931<pre><code>Entry path name (variable length) relative to top level directory
Junio C Hamanof2b74942012-11-20 21:06:26932 (without leading slash). '/' is used as path separator. The special
933 path components ".", ".." and ".git" (without quotes) are disallowed.
Junio C Hamanoc14e6ad2014-10-31 20:25:53934 Trailing slash is also disallowed.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26935</div></div>
936<div class="literalblock">
937<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53938<pre><code>The exact encoding is undefined, but the '.' and '/' characters
Junio C Hamanof2b74942012-11-20 21:06:26939are encoded in 7-bit ASCII and the encoding cannot contain a NUL
Junio C Hamanoc14e6ad2014-10-31 20:25:53940byte (iow, this is a UNIX pathname).</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26941</div></div>
942<div class="literalblock">
943<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53944<pre><code>(Version 4) In version 4, the entry path name is prefix-compressed
Junio C Hamanof2b74942012-11-20 21:06:26945 relative to the path name for the previous entry (the very first
946 entry is encoded as if the path name for the previous entry is an
947 empty string). At the beginning of an entry, an integer N in the
948 variable width encoding (the same encoding as the offset is encoded
949 for OFS_DELTA pack entries; see pack-format.txt) is stored, followed
950 by a NUL-terminated string S. Removing N bytes from the end of the
951 path name for the previous entry, and replacing it with the string S
Junio C Hamanoc14e6ad2014-10-31 20:25:53952 yields the path name for this entry.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26953</div></div>
954<div class="literalblock">
955<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53956<pre><code>1-8 nul bytes as necessary to pad the entry to a multiple of eight bytes
957while keeping the name NUL-terminated.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26958</div></div>
959<div class="literalblock">
960<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53961<pre><code>(Version 4) In version 4, the padding after the pathname does not
962exist.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26963</div></div>
Junio C Hamano6f0c9442014-07-16 21:51:32964<div class="literalblock">
965<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53966<pre><code>Interpretation of index entries in split index mode is completely
967different. See below for details.</code></pre>
Junio C Hamano6f0c9442014-07-16 21:51:32968</div></div>
Junio C Hamanof2b74942012-11-20 21:06:26969</div>
Junio C Hamano9d971152012-12-19 00:43:11970</div>
971<div class="sect1">
Junio C Hamanof2b74942012-11-20 21:06:26972<h2 id="_extensions">Extensions</h2>
973<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:11974<div class="sect2">
975<h3 id="_cached_tree">Cached tree</h3>
Junio C Hamanof2b74942012-11-20 21:06:26976<div class="literalblock">
977<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53978<pre><code>Cached tree extension contains pre-computed hashes for trees that can
Junio C Hamanof2b74942012-11-20 21:06:26979be derived from the index. It helps speed up tree object generation
Junio C Hamanoc14e6ad2014-10-31 20:25:53980from index for a new commit.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26981</div></div>
982<div class="literalblock">
983<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53984<pre><code>When a path is updated in index, the path must be invalidated and
985removed from tree cache.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26986</div></div>
987<div class="literalblock">
988<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53989<pre><code>The signature for this extension is { 'T', 'R', 'E', 'E' }.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26990</div></div>
991<div class="literalblock">
992<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53993<pre><code>A series of entries fill the entire extension; each of which
994consists of:</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26995</div></div>
996<div class="ulist"><ul>
997<li>
998<p>
999NUL-terminated path component (relative to its parent directory);
1000</p>
1001</li>
1002<li>
1003<p>
1004ASCII decimal number of entries in the index that is covered by the
1005 tree this entry represents (entry_count);
1006</p>
1007</li>
1008<li>
1009<p>
1010A space (ASCII 32);
1011</p>
1012</li>
1013<li>
1014<p>
1015ASCII decimal number that represents the number of subtrees this
1016 tree has;
1017</p>
1018</li>
1019<li>
1020<p>
1021A newline (ASCII 10); and
1022</p>
1023</li>
1024<li>
1025<p>
1026160-bit object name for the object that would result from writing
1027 this span of index as a tree.
1028</p>
1029<div class="literalblock">
1030<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531031<pre><code>An entry can be in an invalidated state and is represented by having
Junio C Hamanodb81b992012-12-21 23:49:121032a negative number in the entry_count field. In this case, there is no
1033object name and the next entry starts immediately after the newline.
Junio C Hamanoc14e6ad2014-10-31 20:25:531034When writing an invalid entry, -1 should always be used as entry_count.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261035</div></div>
1036<div class="literalblock">
1037<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531038<pre><code>The entries are written out in the top-down, depth-first order. The
Junio C Hamanof2b74942012-11-20 21:06:261039first entry represents the root level of the repository, followed by the
Junio C Hamanoee615802015-10-29 21:45:261040first subtree--let's call this A--of the root level (with its name
Junio C Hamanof2b74942012-11-20 21:06:261041relative to the root level), followed by the first subtree of A (with
Junio C Hamanoc14e6ad2014-10-31 20:25:531042its name relative to A), ...</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261043</div></div>
1044</li>
1045</ul></div>
Junio C Hamano9d971152012-12-19 00:43:111046</div>
1047<div class="sect2">
1048<h3 id="_resolve_undo">Resolve undo</h3>
Junio C Hamanof2b74942012-11-20 21:06:261049<div class="literalblock">
1050<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531051<pre><code>A conflict is represented in the index as a set of higher stage entries.
Junio C Hamanof2b74942012-11-20 21:06:261052When a conflict is resolved (e.g. with "git add path"), these higher
Junio C Hamanod7fccbf2013-07-25 03:24:571053stage entries will be removed and a stage-0 entry with proper resolution
Junio C Hamanoc14e6ad2014-10-31 20:25:531054is added.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261055</div></div>
1056<div class="literalblock">
1057<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531058<pre><code>When these higher stage entries are removed, they are saved in the
Junio C Hamanof2b74942012-11-20 21:06:261059resolve undo extension, so that conflicts can be recreated (e.g. with
1060"git checkout -m"), in case users want to redo a conflict resolution
Junio C Hamanoc14e6ad2014-10-31 20:25:531061from scratch.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261062</div></div>
1063<div class="literalblock">
1064<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531065<pre><code>The signature for this extension is { 'R', 'E', 'U', 'C' }.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261066</div></div>
1067<div class="literalblock">
1068<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531069<pre><code>A series of entries fill the entire extension; each of which
1070consists of:</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261071</div></div>
1072<div class="ulist"><ul>
1073<li>
1074<p>
1075NUL-terminated pathname the entry describes (relative to the root of
1076 the repository, i.e. full pathname);
1077</p>
1078</li>
1079<li>
1080<p>
1081Three NUL-terminated ASCII octal numbers, entry mode of entries in
1082 stage 1 to 3 (a missing stage is represented by "0" in this field);
1083 and
1084</p>
1085</li>
1086<li>
1087<p>
1088At most three 160-bit object names of the entry in stages from 1 to 3
1089 (nothing is written for a missing stage).
1090</p>
1091</li>
1092</ul></div>
1093</div>
Junio C Hamano6f0c9442014-07-16 21:51:321094<div class="sect2">
1095<h3 id="_split_index">Split index</h3>
1096<div class="literalblock">
1097<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531098<pre><code>In split index mode, the majority of index entries could be stored
Junio C Hamano6f0c9442014-07-16 21:51:321099in a separate file. This extension records the changes to be made on
Junio C Hamanoc14e6ad2014-10-31 20:25:531100top of that to produce the final index.</code></pre>
Junio C Hamano6f0c9442014-07-16 21:51:321101</div></div>
1102<div class="literalblock">
1103<div class="content">
Junio C Hamano6df93d92014-12-22 22:48:091104<pre><code>The signature for this extension is { 'l', 'i', 'n', 'k' }.</code></pre>
Junio C Hamano6f0c9442014-07-16 21:51:321105</div></div>
1106<div class="literalblock">
1107<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531108<pre><code>The extension consists of:</code></pre>
Junio C Hamano6f0c9442014-07-16 21:51:321109</div></div>
1110<div class="ulist"><ul>
1111<li>
1112<p>
1113160-bit SHA-1 of the shared index file. The shared index file path
1114 is $GIT_DIR/sharedindex.&lt;SHA-1&gt;. If all 160 bits are zero, the
1115 index does not require a shared index file.
1116</p>
1117</li>
1118<li>
1119<p>
1120An ewah-encoded delete bitmap, each bit represents an entry in the
1121 shared index. If a bit is set, its corresponding entry in the
1122 shared index will be removed from the final index. Note, because
1123 a delete operation changes index entry positions, but we do need
1124 original positions in replace phase, it&#8217;s best to just mark
1125 entries for removal, then do a mass deletion after replacement.
1126</p>
1127</li>
1128<li>
1129<p>
1130An ewah-encoded replace bitmap, each bit represents an entry in
1131 the shared index. If a bit is set, its corresponding entry in the
1132 shared index will be replaced with an entry in this index
1133 file. All replaced entries are stored in sorted order in this
1134 index. The first "1" bit in the replace bitmap corresponds to the
1135 first index entry, the second "1" bit to the second entry and so
1136 on. Replaced entries may have empty path names to save space.
1137</p>
1138<div class="literalblock">
1139<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531140<pre><code>The remaining index entries after replaced ones will be added to the
Junio C Hamanofb5ffde2014-11-04 22:38:561141final index. These added entries are also sorted by entry name then
Junio C Hamanoc14e6ad2014-10-31 20:25:531142stage.</code></pre>
Junio C Hamano6f0c9442014-07-16 21:51:321143</div></div>
1144</li>
1145</ul></div>
1146</div>
Junio C Hamanof2b74942012-11-20 21:06:261147</div>
Junio C Hamano9d971152012-12-19 00:43:111148</div>
Junio C Hamanoc4e2a202015-05-26 21:38:471149<div class="sect1">
1150<h2 id="_untracked_cache">Untracked cache</h2>
1151<div class="sectionbody">
1152<div class="literalblock">
1153<div class="content">
1154<pre><code>Untracked cache saves the untracked file list and necessary data to
1155verify the cache. The signature for this extension is { 'U', 'N',
1156'T', 'R' }.</code></pre>
1157</div></div>
1158<div class="literalblock">
1159<div class="content">
1160<pre><code>The extension starts with</code></pre>
1161</div></div>
1162<div class="ulist"><ul>
1163<li>
1164<p>
1165A sequence of NUL-terminated strings, preceded by the size of the
1166 sequence in variable width encoding. Each string describes the
1167 environment where the cache can be used.
1168</p>
1169</li>
1170<li>
1171<p>
1172Stat data of $GIT_DIR/info/exclude. See "Index entry" section from
1173 ctime field until "file size".
1174</p>
1175</li>
1176<li>
1177<p>
1178Stat data of core.excludesfile
1179</p>
1180</li>
1181<li>
1182<p>
118332-bit dir_flags (see struct dir_struct)
1184</p>
1185</li>
1186<li>
1187<p>
1188160-bit SHA-1 of $GIT_DIR/info/exclude. Null SHA-1 means the file
1189 does not exist.
1190</p>
1191</li>
1192<li>
1193<p>
1194160-bit SHA-1 of core.excludesfile. Null SHA-1 means the file does
1195 not exist.
1196</p>
1197</li>
1198<li>
1199<p>
1200NUL-terminated string of per-dir exclude file name. This usually
1201 is ".gitignore".
1202</p>
1203</li>
1204<li>
1205<p>
1206The number of following directory blocks, variable width
1207 encoding. If this number is zero, the extension ends here with a
1208 following NUL.
1209</p>
1210</li>
1211<li>
1212<p>
1213A number of directory blocks in depth-first-search order, each
1214 consists of
1215</p>
1216</li>
1217<li>
1218<p>
1219The number of untracked entries, variable width encoding.
1220</p>
1221</li>
1222<li>
1223<p>
1224The number of sub-directory blocks, variable width encoding.
1225</p>
1226</li>
1227<li>
1228<p>
1229The directory name terminated by NUL.
1230</p>
1231</li>
1232<li>
1233<p>
Junio C Hamanob6aa12e2015-08-19 22:40:171234A number of untracked file/dir names terminated by NUL.
Junio C Hamanoc4e2a202015-05-26 21:38:471235</p>
1236</li>
1237</ul></div>
1238<div class="paragraph"><p>The remaining data of each directory block is grouped by type:</p></div>
1239<div class="ulist"><ul>
1240<li>
1241<p>
1242An ewah bitmap, the n-th bit marks whether the n-th directory has
1243 valid untracked cache entries.
1244</p>
1245</li>
1246<li>
1247<p>
1248An ewah bitmap, the n-th bit records "check-only" bit of
1249 read_directory_recursive() for the n-th directory.
1250</p>
1251</li>
1252<li>
1253<p>
1254An ewah bitmap, the n-th bit indicates whether SHA-1 and stat data
1255 is valid for the n-th directory and exists in the next data.
1256</p>
1257</li>
1258<li>
1259<p>
1260An array of stat data. The n-th data corresponds with the n-th
1261 "one" bit in the previous ewah bitmap.
1262</p>
1263</li>
1264<li>
1265<p>
1266An array of SHA-1. The n-th SHA-1 corresponds with the n-th "one" bit
1267 in the previous ewah bitmap.
1268</p>
1269</li>
1270<li>
1271<p>
1272One NUL.
1273</p>
1274</li>
1275</ul></div>
1276</div>
1277</div>
Junio C Hamanod7105602017-11-21 05:32:501278<div class="sect1">
1279<h2 id="_file_system_monitor_cache">File System Monitor cache</h2>
1280<div class="sectionbody">
1281<div class="literalblock">
1282<div class="content">
1283<pre><code>The file system monitor cache tracks files for which the core.fsmonitor
1284hook has told us about changes. The signature for this extension is
1285{ 'F', 'S', 'M', 'N' }.</code></pre>
1286</div></div>
1287<div class="literalblock">
1288<div class="content">
1289<pre><code>The extension starts with</code></pre>
1290</div></div>
1291<div class="ulist"><ul>
1292<li>
1293<p>
129432-bit version number: the current supported version is 1.
1295</p>
1296</li>
1297<li>
1298<p>
129964-bit time: the extension data reflects all changes through the given
1300 time which is stored as the nanoseconds elapsed since midnight,
1301 January 1, 1970.
1302</p>
1303</li>
1304<li>
1305<p>
130632-bit bitmap size: the size of the CE_FSMONITOR_VALID bitmap.
1307</p>
1308</li>
1309<li>
1310<p>
1311An ewah bitmap, the n-th bit indicates whether the n-th index entry
1312 is not CE_FSMONITOR_VALID.
1313</p>
1314</li>
1315</ul></div>
1316</div>
1317</div>
Junio C Hamanoabe2c592018-10-19 05:42:531318<div class="sect1">
1319<h2 id="_end_of_index_entry">End of Index Entry</h2>
1320<div class="sectionbody">
1321<div class="literalblock">
1322<div class="content">
1323<pre><code>The End of Index Entry (EOIE) is used to locate the end of the variable
Junio C Hamano8ef91f32019-12-01 22:58:271324length index entries and the beginning of the extensions. Code can take
Junio C Hamanoabe2c592018-10-19 05:42:531325advantage of this to quickly locate the index extensions without having
1326to parse through all of the index entries.</code></pre>
1327</div></div>
1328<div class="literalblock">
1329<div class="content">
1330<pre><code>Because it must be able to be loaded before the variable length cache
1331entries and other index extensions, this extension must be written last.
1332The signature for this extension is { 'E', 'O', 'I', 'E' }.</code></pre>
1333</div></div>
1334<div class="literalblock">
1335<div class="content">
1336<pre><code>The extension consists of:</code></pre>
1337</div></div>
1338<div class="ulist"><ul>
1339<li>
1340<p>
134132-bit offset to the end of the index entries
1342</p>
1343</li>
1344<li>
1345<p>
1346160-bit SHA-1 over the extension types and their sizes (but not
1347 their contents). E.g. if we have "TREE" extension that is N-bytes
1348 long, "REUC" extension that is M-bytes long, followed by "EOIE",
1349 then the hash would be:
1350</p>
1351<div class="literalblock">
1352<div class="content">
1353<pre><code>SHA-1("TREE" + &lt;binary representation of N&gt; +
1354 "REUC" + &lt;binary representation of M&gt;)</code></pre>
1355</div></div>
1356</li>
1357</ul></div>
1358</div>
1359</div>
1360<div class="sect1">
1361<h2 id="_index_entry_offset_table">Index Entry Offset Table</h2>
1362<div class="sectionbody">
1363<div class="literalblock">
1364<div class="content">
1365<pre><code>The Index Entry Offset Table (IEOT) is used to help address the CPU
1366cost of loading the index by enabling multi-threading the process of
1367converting cache entries from the on-disk format to the in-memory format.
1368The signature for this extension is { 'I', 'E', 'O', 'T' }.</code></pre>
1369</div></div>
1370<div class="literalblock">
1371<div class="content">
1372<pre><code>The extension consists of:</code></pre>
1373</div></div>
1374<div class="ulist"><ul>
1375<li>
1376<p>
137732-bit version (currently 1)
1378</p>
1379</li>
1380<li>
1381<p>
1382A number of index offset entries each consisting of:
1383</p>
1384</li>
1385<li>
1386<p>
Junio C Hamano8ef91f32019-12-01 22:58:27138732-bit offset from the beginning of the file to the first cache entry
Junio C Hamanoabe2c592018-10-19 05:42:531388 in this block of entries.
1389</p>
1390</li>
1391<li>
1392<p>
139332-bit count of cache entries in this block
1394</p>
1395</li>
1396</ul></div>
1397</div>
1398</div>
Junio C Hamano9d971152012-12-19 00:43:111399</div>
Junio C Hamanof2b74942012-11-20 21:06:261400<div id="footnotes"><hr /></div>
1401<div id="footer">
1402<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:531403Last updated
Junio C Hamano7a46cd62020-03-15 21:57:101404 2020-03-10 08:03:13 PDT
Junio C Hamanof2b74942012-11-20 21:06:261405</div>
1406</div>
1407</body>
1408</html>