Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1 | <!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 Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
| 6 | <meta name="generator" content="AsciiDoc 8.6.8" /> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 7 | <title>Git index format</title> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 8 | <style type="text/css"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
| 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
| 37 | |
| 38 | em { |
| 39 | font-style: italic; |
| 40 | color: navy; |
| 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
| 45 | color: #083194; |
| 46 | } |
| 47 | |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
| 55 | h1, h2, h3 { |
| 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
| 59 | padding-top: 0.5em; |
| 60 | } |
| 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
| 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 89 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 98 | |
| 99 | #author { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 100 | color: #527bbd; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 101 | font-weight: bold; |
| 102 | font-size: 1.1em; |
| 103 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 104 | #email { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 105 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 106 | #revnumber, #revdate, #revremark { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 107 | } |
| 108 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 109 | #footer { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 110 | font-size: small; |
| 111 | border-top: 2px solid silver; |
| 112 | padding-top: 0.5em; |
| 113 | margin-top: 4.0em; |
| 114 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 115 | #footer-text { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 116 | float: left; |
| 117 | padding-bottom: 0.5em; |
| 118 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 119 | #footer-badges { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 120 | float: right; |
| 121 | padding-bottom: 0.5em; |
| 122 | } |
| 123 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 124 | #preamble { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 125 | margin-top: 1.5em; |
| 126 | margin-bottom: 1.5em; |
| 127 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 128 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 129 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 130 | div.admonitionblock { |
| 131 | margin-top: 1.0em; |
| 132 | margin-bottom: 1.5em; |
| 133 | } |
| 134 | div.admonitionblock { |
| 135 | margin-top: 2.0em; |
| 136 | margin-bottom: 2.0em; |
| 137 | margin-right: 10%; |
| 138 | color: #606060; |
| 139 | } |
| 140 | |
| 141 | div.content { /* Block element content. */ |
| 142 | padding: 0; |
| 143 | } |
| 144 | |
| 145 | /* Block element titles. */ |
| 146 | div.title, caption.title { |
| 147 | color: #527bbd; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 148 | font-weight: bold; |
| 149 | text-align: left; |
| 150 | margin-top: 1.0em; |
| 151 | margin-bottom: 0.5em; |
| 152 | } |
| 153 | div.title + * { |
| 154 | margin-top: 0; |
| 155 | } |
| 156 | |
| 157 | td div.title:first-child { |
| 158 | margin-top: 0.0em; |
| 159 | } |
| 160 | div.content div.title:first-child { |
| 161 | margin-top: 0.0em; |
| 162 | } |
| 163 | div.content + div.title { |
| 164 | margin-top: 0.0em; |
| 165 | } |
| 166 | |
| 167 | div.sidebarblock > div.content { |
| 168 | background: #ffffee; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 169 | border: 1px solid #dddddd; |
| 170 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 171 | padding: 0.5em; |
| 172 | } |
| 173 | |
| 174 | div.listingblock > div.content { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 175 | border: 1px solid #dddddd; |
| 176 | border-left: 5px solid #f0f0f0; |
| 177 | background: #f8f8f8; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 178 | padding: 0.5em; |
| 179 | } |
| 180 | |
| 181 | div.quoteblock, div.verseblock { |
| 182 | padding-left: 1.0em; |
| 183 | margin-left: 1.0em; |
| 184 | margin-right: 10%; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 185 | border-left: 5px solid #f0f0f0; |
| 186 | color: #888; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 187 | } |
| 188 | |
| 189 | div.quoteblock > div.attribution { |
| 190 | padding-top: 0.5em; |
| 191 | text-align: right; |
| 192 | } |
| 193 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 194 | div.verseblock > pre.content { |
| 195 | font-family: inherit; |
| 196 | font-size: inherit; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 197 | } |
| 198 | div.verseblock > div.attribution { |
| 199 | padding-top: 0.75em; |
| 200 | text-align: left; |
| 201 | } |
| 202 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
| 203 | div.verseblock + div.attribution { |
| 204 | text-align: left; |
| 205 | } |
| 206 | |
| 207 | div.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 | } |
| 215 | div.admonitionblock td.content { |
| 216 | padding-left: 0.5em; |
| 217 | border-left: 3px solid #dddddd; |
| 218 | } |
| 219 | |
| 220 | div.exampleblock > div.content { |
| 221 | border-left: 3px solid #dddddd; |
| 222 | padding-left: 0.5em; |
| 223 | } |
| 224 | |
| 225 | div.imageblock div.content { padding-left: 0; } |
| 226 | span.image img { border-style: none; } |
| 227 | a.image:visited { color: white; } |
| 228 | |
| 229 | dl { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| 233 | dt { |
| 234 | margin-top: 0.5em; |
| 235 | margin-bottom: 0; |
| 236 | font-style: normal; |
| 237 | color: navy; |
| 238 | } |
| 239 | dd > *:first-child { |
| 240 | margin-top: 0.1em; |
| 241 | } |
| 242 | |
| 243 | ul, ol { |
| 244 | list-style-position: outside; |
| 245 | } |
| 246 | ol.arabic { |
| 247 | list-style-type: decimal; |
| 248 | } |
| 249 | ol.loweralpha { |
| 250 | list-style-type: lower-alpha; |
| 251 | } |
| 252 | ol.upperalpha { |
| 253 | list-style-type: upper-alpha; |
| 254 | } |
| 255 | ol.lowerroman { |
| 256 | list-style-type: lower-roman; |
| 257 | } |
| 258 | ol.upperroman { |
| 259 | list-style-type: upper-roman; |
| 260 | } |
| 261 | |
| 262 | div.compact ul, div.compact ol, |
| 263 | div.compact p, div.compact p, |
| 264 | div.compact div, div.compact div { |
| 265 | margin-top: 0.1em; |
| 266 | margin-bottom: 0.1em; |
| 267 | } |
| 268 | |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 269 | tfoot { |
| 270 | font-weight: bold; |
| 271 | } |
| 272 | td > div.verse { |
| 273 | white-space: pre; |
| 274 | } |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 275 | |
| 276 | div.hdlist { |
| 277 | margin-top: 0.8em; |
| 278 | margin-bottom: 0.8em; |
| 279 | } |
| 280 | div.hdlist tr { |
| 281 | padding-bottom: 15px; |
| 282 | } |
| 283 | dt.hdlist1.strong, td.hdlist1.strong { |
| 284 | font-weight: bold; |
| 285 | } |
| 286 | td.hdlist1 { |
| 287 | vertical-align: top; |
| 288 | font-style: normal; |
| 289 | padding-right: 0.8em; |
| 290 | color: navy; |
| 291 | } |
| 292 | td.hdlist2 { |
| 293 | vertical-align: top; |
| 294 | } |
| 295 | div.hdlist.compact tr { |
| 296 | margin: 0; |
| 297 | padding-bottom: 0; |
| 298 | } |
| 299 | |
| 300 | .comment { |
| 301 | background: yellow; |
| 302 | } |
| 303 | |
| 304 | .footnote, .footnoteref { |
| 305 | font-size: 0.8em; |
| 306 | } |
| 307 | |
| 308 | span.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 Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 331 | div.colist td { |
| 332 | padding-right: 0.5em; |
| 333 | padding-bottom: 0.3em; |
| 334 | vertical-align: top; |
| 335 | } |
| 336 | div.colist td img { |
| 337 | margin-top: 0.3em; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 338 | } |
| 339 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 340 | @media print { |
| 341 | #footer-badges { display: none; } |
| 342 | } |
| 343 | |
| 344 | #toc { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 345 | margin-bottom: 2.5em; |
| 346 | } |
| 347 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 348 | #toctitle { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 349 | color: #527bbd; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 350 | font-size: 1.1em; |
| 351 | font-weight: bold; |
| 352 | margin-top: 1.0em; |
| 353 | margin-bottom: 0.1em; |
| 354 | } |
| 355 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 356 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 357 | margin-top: 0; |
| 358 | margin-bottom: 0; |
| 359 | } |
| 360 | div.toclevel2 { |
| 361 | margin-left: 2em; |
| 362 | font-size: 0.9em; |
| 363 | } |
| 364 | div.toclevel3 { |
| 365 | margin-left: 4em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel4 { |
| 369 | margin-left: 6em; |
| 370 | font-size: 0.9em; |
| 371 | } |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 372 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 373 | span.aqua { color: aqua; } |
| 374 | span.black { color: black; } |
| 375 | span.blue { color: blue; } |
| 376 | span.fuchsia { color: fuchsia; } |
| 377 | span.gray { color: gray; } |
| 378 | span.green { color: green; } |
| 379 | span.lime { color: lime; } |
| 380 | span.maroon { color: maroon; } |
| 381 | span.navy { color: navy; } |
| 382 | span.olive { color: olive; } |
| 383 | span.purple { color: purple; } |
| 384 | span.red { color: red; } |
| 385 | span.silver { color: silver; } |
| 386 | span.teal { color: teal; } |
| 387 | span.white { color: white; } |
| 388 | span.yellow { color: yellow; } |
| 389 | |
| 390 | span.aqua-background { background: aqua; } |
| 391 | span.black-background { background: black; } |
| 392 | span.blue-background { background: blue; } |
| 393 | span.fuchsia-background { background: fuchsia; } |
| 394 | span.gray-background { background: gray; } |
| 395 | span.green-background { background: green; } |
| 396 | span.lime-background { background: lime; } |
| 397 | span.maroon-background { background: maroon; } |
| 398 | span.navy-background { background: navy; } |
| 399 | span.olive-background { background: olive; } |
| 400 | span.purple-background { background: purple; } |
| 401 | span.red-background { background: red; } |
| 402 | span.silver-background { background: silver; } |
| 403 | span.teal-background { background: teal; } |
| 404 | span.white-background { background: white; } |
| 405 | span.yellow-background { background: yellow; } |
| 406 | |
| 407 | span.big { font-size: 2em; } |
| 408 | span.small { font-size: 0.6em; } |
| 409 | |
| 410 | span.underline { text-decoration: underline; } |
| 411 | span.overline { text-decoration: overline; } |
| 412 | span.line-through { text-decoration: line-through; } |
| 413 | |
| 414 | div.unbreakable { page-break-inside: avoid; } |
| 415 | |
| 416 | |
| 417 | /* |
| 418 | * xhtml11 specific |
| 419 | * |
| 420 | * */ |
| 421 | |
| 422 | div.tableblock { |
| 423 | margin-top: 1.0em; |
| 424 | margin-bottom: 1.5em; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 425 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 426 | div.tableblock > table { |
| 427 | border: 3px solid #527bbd; |
| 428 | } |
| 429 | thead, p.table.header { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 430 | font-weight: bold; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 431 | color: #527bbd; |
| 432 | } |
| 433 | p.table { |
| 434 | margin-top: 0; |
| 435 | } |
| 436 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 437 | div.tableblock > table[frame="void"] { |
| 438 | border-style: none; |
| 439 | } |
| 440 | div.tableblock > table[frame="hsides"] { |
| 441 | border-left-style: none; |
| 442 | border-right-style: none; |
| 443 | } |
| 444 | div.tableblock > table[frame="vsides"] { |
| 445 | border-top-style: none; |
| 446 | border-bottom-style: none; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 447 | } |
| 448 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 449 | |
| 450 | /* |
| 451 | * html5 specific |
| 452 | * |
| 453 | * */ |
| 454 | |
| 455 | table.tableblock { |
| 456 | margin-top: 1.0em; |
| 457 | margin-bottom: 1.5em; |
| 458 | } |
| 459 | thead, p.tableblock.header { |
| 460 | font-weight: bold; |
| 461 | color: #527bbd; |
| 462 | } |
| 463 | p.tableblock { |
| 464 | margin-top: 0; |
| 465 | } |
| 466 | table.tableblock { |
| 467 | border-width: 3px; |
| 468 | border-spacing: 0px; |
| 469 | border-style: solid; |
| 470 | border-color: #527bbd; |
| 471 | border-collapse: collapse; |
| 472 | } |
| 473 | th.tableblock, td.tableblock { |
| 474 | border-width: 1px; |
| 475 | padding: 4px; |
| 476 | border-style: solid; |
| 477 | border-color: #527bbd; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 478 | } |
| 479 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 480 | table.tableblock.frame-topbot { |
| 481 | border-left-style: hidden; |
| 482 | border-right-style: hidden; |
| 483 | } |
| 484 | table.tableblock.frame-sides { |
| 485 | border-top-style: hidden; |
| 486 | border-bottom-style: hidden; |
| 487 | } |
| 488 | table.tableblock.frame-none { |
| 489 | border-style: hidden; |
| 490 | } |
| 491 | |
| 492 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 493 | text-align: left; |
| 494 | } |
| 495 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 496 | text-align: center; |
| 497 | } |
| 498 | th.tableblock.halign-right, td.tableblock.halign-right { |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 499 | text-align: right; |
| 500 | } |
| 501 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 502 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 503 | vertical-align: top; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 504 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 505 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 506 | vertical-align: middle; |
| 507 | } |
| 508 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 509 | vertical-align: bottom; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 510 | } |
| 511 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 512 | |
| 513 | /* |
| 514 | * manpage specific |
| 515 | * |
| 516 | * */ |
| 517 | |
| 518 | body.manpage h1 { |
| 519 | padding-top: 0.5em; |
| 520 | padding-bottom: 0.5em; |
| 521 | border-top: 2px solid silver; |
| 522 | border-bottom: 2px solid silver; |
| 523 | } |
| 524 | body.manpage h2 { |
| 525 | border-style: none; |
| 526 | } |
| 527 | body.manpage div.sectionbody { |
| 528 | margin-left: 3em; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 529 | } |
| 530 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 531 | @media print { |
| 532 | body.manpage div#toc { display: none; } |
| 533 | } |
| 534 | |
| 535 | |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 536 | </style> |
| 537 | <script type="text/javascript"> |
| 538 | /*<![CDATA[*/ |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 539 | var 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. |
| 559 | toc: 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 Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 580 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 581 | // 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 Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 600 | 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 Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 619 | 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 | |
| 645 | footnotes: function () { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 646 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 647 | var i; |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 648 | var noteholder = document.getElementById("footnotes"); |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 649 | 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 Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 664 | 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 Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 670 | 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 Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 680 | 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 Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 684 | 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 Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 703 | }, |
| 704 | |
| 705 | install: 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 Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 725 | } |
| 726 | |
| 727 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 728 | asciidoc.install(); |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 729 | /*]]>*/ |
| 730 | </script> |
| 731 | </head> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 732 | <body class="article"> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 733 | <div id="header"> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 734 | <h1>Git index format</h1> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 735 | </div> |
| 736 | <div id="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 737 | <div class="sect1"> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 738 | <h2 id="_the_git_index_file_has_the_following_format">The Git index file has the following format</h2> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 739 | <div class="sectionbody"> |
| 740 | <div class="literalblock"> |
| 741 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 742 | <pre><code>All binary numbers are in network byte order. Version 2 is described |
| 743 | here unless stated otherwise.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 744 | </div></div> |
| 745 | <div class="ulist"><ul> |
| 746 | <li> |
| 747 | <p> |
| 748 | A 12-byte header consisting of |
| 749 | </p> |
| 750 | <div class="literalblock"> |
| 751 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 752 | <pre><code>4-byte signature: |
| 753 | The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 754 | </div></div> |
| 755 | <div class="literalblock"> |
| 756 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 757 | <pre><code>4-byte version number: |
Junio C Hamano | 947ab82 | 2013-03-19 23:07:29 | [diff] [blame] | 758 | The current supported versions are 2, 3 and 4.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 759 | </div></div> |
| 760 | <div class="literalblock"> |
| 761 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 762 | <pre><code>32-bit number of index entries.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 763 | </div></div> |
| 764 | </li> |
| 765 | <li> |
| 766 | <p> |
| 767 | A number of sorted index entries (see below). |
| 768 | </p> |
| 769 | </li> |
| 770 | <li> |
| 771 | <p> |
| 772 | Extensions |
| 773 | </p> |
| 774 | <div class="literalblock"> |
| 775 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 776 | <pre><code>Extensions are identified by signature. Optional extensions can |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 777 | be ignored if Git does not understand them.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 778 | </div></div> |
| 779 | <div class="literalblock"> |
| 780 | <div class="content"> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 781 | <pre><code>Git currently supports cached tree and resolve undo extensions.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 782 | </div></div> |
| 783 | <div class="literalblock"> |
| 784 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 785 | <pre><code>4-byte extension signature. If the first byte is 'A'..'Z' the |
| 786 | extension is optional and can be ignored.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 787 | </div></div> |
| 788 | <div class="literalblock"> |
| 789 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 790 | <pre><code>32-bit size of the extension</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 791 | </div></div> |
| 792 | <div class="literalblock"> |
| 793 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 794 | <pre><code>Extension data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 795 | </div></div> |
| 796 | </li> |
| 797 | <li> |
| 798 | <p> |
| 799 | 160-bit SHA-1 over the content of the index file before this |
| 800 | checksum. |
| 801 | </p> |
| 802 | </li> |
| 803 | </ul></div> |
| 804 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 805 | </div> |
| 806 | <div class="sect1"> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 807 | <h2 id="_index_entry">Index entry</h2> |
| 808 | <div class="sectionbody"> |
| 809 | <div class="literalblock"> |
| 810 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 811 | <pre><code>Index entries are sorted in ascending order on the name field, |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 812 | interpreted as a string of unsigned bytes (i.e. memcmp() order, no |
| 813 | localization, no special casing of directory separator '/'). Entries |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 814 | with the same name are sorted by their stage field.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 815 | </div></div> |
| 816 | <div class="literalblock"> |
| 817 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 818 | <pre><code>32-bit ctime seconds, the last time a file's metadata changed |
| 819 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 820 | </div></div> |
| 821 | <div class="literalblock"> |
| 822 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 823 | <pre><code>32-bit ctime nanosecond fractions |
| 824 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 825 | </div></div> |
| 826 | <div class="literalblock"> |
| 827 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 828 | <pre><code>32-bit mtime seconds, the last time a file's data changed |
| 829 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 830 | </div></div> |
| 831 | <div class="literalblock"> |
| 832 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 833 | <pre><code>32-bit mtime nanosecond fractions |
| 834 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 835 | </div></div> |
| 836 | <div class="literalblock"> |
| 837 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 838 | <pre><code>32-bit dev |
| 839 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 840 | </div></div> |
| 841 | <div class="literalblock"> |
| 842 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 843 | <pre><code>32-bit ino |
| 844 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 845 | </div></div> |
| 846 | <div class="literalblock"> |
| 847 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 848 | <pre><code>32-bit mode, split into (high to low bits)</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 849 | </div></div> |
| 850 | <div class="literalblock"> |
| 851 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 852 | <pre><code>4-bit object type |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 853 | valid values in binary are 1000 (regular file), 1010 (symbolic link) |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 854 | and 1110 (gitlink)</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 855 | </div></div> |
| 856 | <div class="literalblock"> |
| 857 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 858 | <pre><code>3-bit unused</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 859 | </div></div> |
| 860 | <div class="literalblock"> |
| 861 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 862 | <pre><code>9-bit unix permission. Only 0755 and 0644 are valid for regular files. |
| 863 | Symbolic links and gitlinks have value 0 in this field.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 864 | </div></div> |
| 865 | <div class="literalblock"> |
| 866 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 867 | <pre><code>32-bit uid |
| 868 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 869 | </div></div> |
| 870 | <div class="literalblock"> |
| 871 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 872 | <pre><code>32-bit gid |
| 873 | this is stat(2) data</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 874 | </div></div> |
| 875 | <div class="literalblock"> |
| 876 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 877 | <pre><code>32-bit file size |
| 878 | This is the on-disk size from stat(2), truncated to 32-bit.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 879 | </div></div> |
| 880 | <div class="literalblock"> |
| 881 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 882 | <pre><code>160-bit SHA-1 for the represented object</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 883 | </div></div> |
| 884 | <div class="literalblock"> |
| 885 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 886 | <pre><code>A 16-bit 'flags' field split into (high to low bits)</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 887 | </div></div> |
| 888 | <div class="literalblock"> |
| 889 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 890 | <pre><code>1-bit assume-valid flag</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 891 | </div></div> |
| 892 | <div class="literalblock"> |
| 893 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 894 | <pre><code>1-bit extended flag (must be zero in version 2)</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 895 | </div></div> |
| 896 | <div class="literalblock"> |
| 897 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 898 | <pre><code>2-bit stage (during merge)</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 899 | </div></div> |
| 900 | <div class="literalblock"> |
| 901 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 902 | <pre><code>12-bit name length if the length is less than 0xFFF; otherwise 0xFFF |
| 903 | is stored in this field.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 904 | </div></div> |
| 905 | <div class="literalblock"> |
| 906 | <div class="content"> |
Junio C Hamano | 947ab82 | 2013-03-19 23:07:29 | [diff] [blame] | 907 | <pre><code>(Version 3 or later) A 16-bit field, only applicable if the |
| 908 | "extended flag" above is 1, split into (high to low bits).</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 909 | </div></div> |
| 910 | <div class="literalblock"> |
| 911 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 912 | <pre><code>1-bit reserved for future</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 913 | </div></div> |
| 914 | <div class="literalblock"> |
| 915 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 916 | <pre><code>1-bit skip-worktree flag (used by sparse checkout)</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 917 | </div></div> |
| 918 | <div class="literalblock"> |
| 919 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 920 | <pre><code>1-bit intent-to-add flag (used by "git add -N")</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 921 | </div></div> |
| 922 | <div class="literalblock"> |
| 923 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 924 | <pre><code>13-bit unused, must be zero</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 925 | </div></div> |
| 926 | <div class="literalblock"> |
| 927 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 928 | <pre><code>Entry path name (variable length) relative to top level directory |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 929 | (without leading slash). '/' is used as path separator. The special |
| 930 | path components ".", ".." and ".git" (without quotes) are disallowed. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 931 | Trailing slash is also disallowed.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 932 | </div></div> |
| 933 | <div class="literalblock"> |
| 934 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 935 | <pre><code>The exact encoding is undefined, but the '.' and '/' characters |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 936 | are encoded in 7-bit ASCII and the encoding cannot contain a NUL |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 937 | byte (iow, this is a UNIX pathname).</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 938 | </div></div> |
| 939 | <div class="literalblock"> |
| 940 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 941 | <pre><code>(Version 4) In version 4, the entry path name is prefix-compressed |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 942 | relative to the path name for the previous entry (the very first |
| 943 | entry is encoded as if the path name for the previous entry is an |
| 944 | empty string). At the beginning of an entry, an integer N in the |
| 945 | variable width encoding (the same encoding as the offset is encoded |
| 946 | for OFS_DELTA pack entries; see pack-format.txt) is stored, followed |
| 947 | by a NUL-terminated string S. Removing N bytes from the end of the |
| 948 | path name for the previous entry, and replacing it with the string S |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 949 | yields the path name for this entry.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 950 | </div></div> |
| 951 | <div class="literalblock"> |
| 952 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 953 | <pre><code>1-8 nul bytes as necessary to pad the entry to a multiple of eight bytes |
| 954 | while keeping the name NUL-terminated.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 955 | </div></div> |
| 956 | <div class="literalblock"> |
| 957 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 958 | <pre><code>(Version 4) In version 4, the padding after the pathname does not |
| 959 | exist.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 960 | </div></div> |
| 961 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 962 | </div> |
| 963 | <div class="sect1"> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 964 | <h2 id="_extensions">Extensions</h2> |
| 965 | <div class="sectionbody"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 966 | <div class="sect2"> |
| 967 | <h3 id="_cached_tree">Cached tree</h3> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 968 | <div class="literalblock"> |
| 969 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 970 | <pre><code>Cached tree extension contains pre-computed hashes for trees that can |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 971 | be derived from the index. It helps speed up tree object generation |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 972 | from index for a new commit.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 973 | </div></div> |
| 974 | <div class="literalblock"> |
| 975 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 976 | <pre><code>When a path is updated in index, the path must be invalidated and |
| 977 | removed from tree cache.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 978 | </div></div> |
| 979 | <div class="literalblock"> |
| 980 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 981 | <pre><code>The signature for this extension is { 'T', 'R', 'E', 'E' }.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 982 | </div></div> |
| 983 | <div class="literalblock"> |
| 984 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 985 | <pre><code>A series of entries fill the entire extension; each of which |
| 986 | consists of:</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 987 | </div></div> |
| 988 | <div class="ulist"><ul> |
| 989 | <li> |
| 990 | <p> |
| 991 | NUL-terminated path component (relative to its parent directory); |
| 992 | </p> |
| 993 | </li> |
| 994 | <li> |
| 995 | <p> |
| 996 | ASCII decimal number of entries in the index that is covered by the |
| 997 | tree this entry represents (entry_count); |
| 998 | </p> |
| 999 | </li> |
| 1000 | <li> |
| 1001 | <p> |
| 1002 | A space (ASCII 32); |
| 1003 | </p> |
| 1004 | </li> |
| 1005 | <li> |
| 1006 | <p> |
| 1007 | ASCII decimal number that represents the number of subtrees this |
| 1008 | tree has; |
| 1009 | </p> |
| 1010 | </li> |
| 1011 | <li> |
| 1012 | <p> |
| 1013 | A newline (ASCII 10); and |
| 1014 | </p> |
| 1015 | </li> |
| 1016 | <li> |
| 1017 | <p> |
| 1018 | 160-bit object name for the object that would result from writing |
| 1019 | this span of index as a tree. |
| 1020 | </p> |
| 1021 | <div class="literalblock"> |
| 1022 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1023 | <pre><code>An entry can be in an invalidated state and is represented by having |
Junio C Hamano | db81b99 | 2012-12-21 23:49:12 | [diff] [blame] | 1024 | a negative number in the entry_count field. In this case, there is no |
| 1025 | object name and the next entry starts immediately after the newline. |
| 1026 | When writing an invalid entry, -1 should always be used as entry_count.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1027 | </div></div> |
| 1028 | <div class="literalblock"> |
| 1029 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1030 | <pre><code>The entries are written out in the top-down, depth-first order. The |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1031 | first entry represents the root level of the repository, followed by the |
| 1032 | first subtree---let's call this A---of the root level (with its name |
| 1033 | relative to the root level), followed by the first subtree of A (with |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1034 | its name relative to A), ...</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1035 | </div></div> |
| 1036 | </li> |
| 1037 | </ul></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1038 | </div> |
| 1039 | <div class="sect2"> |
| 1040 | <h3 id="_resolve_undo">Resolve undo</h3> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1041 | <div class="literalblock"> |
| 1042 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1043 | <pre><code>A conflict is represented in the index as a set of higher stage entries. |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1044 | When a conflict is resolved (e.g. with "git add path"), these higher |
Junio C Hamano | d7fccbf | 2013-07-25 03:24:57 | [diff] [blame] | 1045 | stage entries will be removed and a stage-0 entry with proper resolution |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1046 | is added.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1047 | </div></div> |
| 1048 | <div class="literalblock"> |
| 1049 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1050 | <pre><code>When these higher stage entries are removed, they are saved in the |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1051 | resolve undo extension, so that conflicts can be recreated (e.g. with |
| 1052 | "git checkout -m"), in case users want to redo a conflict resolution |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1053 | from scratch.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1054 | </div></div> |
| 1055 | <div class="literalblock"> |
| 1056 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1057 | <pre><code>The signature for this extension is { 'R', 'E', 'U', 'C' }.</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1058 | </div></div> |
| 1059 | <div class="literalblock"> |
| 1060 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1061 | <pre><code>A series of entries fill the entire extension; each of which |
| 1062 | consists of:</code></pre> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1063 | </div></div> |
| 1064 | <div class="ulist"><ul> |
| 1065 | <li> |
| 1066 | <p> |
| 1067 | NUL-terminated pathname the entry describes (relative to the root of |
| 1068 | the repository, i.e. full pathname); |
| 1069 | </p> |
| 1070 | </li> |
| 1071 | <li> |
| 1072 | <p> |
| 1073 | Three NUL-terminated ASCII octal numbers, entry mode of entries in |
| 1074 | stage 1 to 3 (a missing stage is represented by "0" in this field); |
| 1075 | and |
| 1076 | </p> |
| 1077 | </li> |
| 1078 | <li> |
| 1079 | <p> |
| 1080 | At most three 160-bit object names of the entry in stages from 1 to 3 |
| 1081 | (nothing is written for a missing stage). |
| 1082 | </p> |
| 1083 | </li> |
| 1084 | </ul></div> |
| 1085 | </div> |
| 1086 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1087 | </div> |
| 1088 | </div> |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1089 | <div id="footnotes"><hr /></div> |
| 1090 | <div id="footer"> |
| 1091 | <div id="footer-text"> |
Junio C Hamano | 683a861 | 2013-08-23 20:50:09 | [diff] [blame] | 1092 | Last updated 2013-08-20 08:40:27 PDT |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 1093 | </div> |
| 1094 | </div> |
| 1095 | </body> |
| 1096 | </html> |