Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [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> |
| 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.6.9" /> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 7 | <title>gitremote-helpers(1)</title> |
| 8 | <style type="text/css"> |
| 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; |
| 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 | |
| 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
| 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 | } |
| 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
| 70 | |
| 71 | div.sectionbody { |
| 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 | } |
| 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
| 89 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 97 | pre { |
| 98 | white-space: pre-wrap; |
| 99 | } |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 100 | |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 101 | #author { |
| 102 | color: #527bbd; |
| 103 | font-weight: bold; |
| 104 | font-size: 1.1em; |
| 105 | } |
| 106 | #email { |
| 107 | } |
| 108 | #revnumber, #revdate, #revremark { |
| 109 | } |
| 110 | |
| 111 | #footer { |
| 112 | font-size: small; |
| 113 | border-top: 2px solid silver; |
| 114 | padding-top: 0.5em; |
| 115 | margin-top: 4.0em; |
| 116 | } |
| 117 | #footer-text { |
| 118 | float: left; |
| 119 | padding-bottom: 0.5em; |
| 120 | } |
| 121 | #footer-badges { |
| 122 | float: right; |
| 123 | padding-bottom: 0.5em; |
| 124 | } |
| 125 | |
| 126 | #preamble { |
| 127 | margin-top: 1.5em; |
| 128 | margin-bottom: 1.5em; |
| 129 | } |
| 130 | div.imageblock, div.exampleblock, div.verseblock, |
| 131 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 132 | div.admonitionblock { |
| 133 | margin-top: 1.0em; |
| 134 | margin-bottom: 1.5em; |
| 135 | } |
| 136 | div.admonitionblock { |
| 137 | margin-top: 2.0em; |
| 138 | margin-bottom: 2.0em; |
| 139 | margin-right: 10%; |
| 140 | color: #606060; |
| 141 | } |
| 142 | |
| 143 | div.content { /* Block element content. */ |
| 144 | padding: 0; |
| 145 | } |
| 146 | |
| 147 | /* Block element titles. */ |
| 148 | div.title, caption.title { |
| 149 | color: #527bbd; |
| 150 | font-weight: bold; |
| 151 | text-align: left; |
| 152 | margin-top: 1.0em; |
| 153 | margin-bottom: 0.5em; |
| 154 | } |
| 155 | div.title + * { |
| 156 | margin-top: 0; |
| 157 | } |
| 158 | |
| 159 | td div.title:first-child { |
| 160 | margin-top: 0.0em; |
| 161 | } |
| 162 | div.content div.title:first-child { |
| 163 | margin-top: 0.0em; |
| 164 | } |
| 165 | div.content + div.title { |
| 166 | margin-top: 0.0em; |
| 167 | } |
| 168 | |
| 169 | div.sidebarblock > div.content { |
| 170 | background: #ffffee; |
| 171 | border: 1px solid #dddddd; |
| 172 | border-left: 4px solid #f0f0f0; |
| 173 | padding: 0.5em; |
| 174 | } |
| 175 | |
| 176 | div.listingblock > div.content { |
| 177 | border: 1px solid #dddddd; |
| 178 | border-left: 5px solid #f0f0f0; |
| 179 | background: #f8f8f8; |
| 180 | padding: 0.5em; |
| 181 | } |
| 182 | |
| 183 | div.quoteblock, div.verseblock { |
| 184 | padding-left: 1.0em; |
| 185 | margin-left: 1.0em; |
| 186 | margin-right: 10%; |
| 187 | border-left: 5px solid #f0f0f0; |
| 188 | color: #888; |
| 189 | } |
| 190 | |
| 191 | div.quoteblock > div.attribution { |
| 192 | padding-top: 0.5em; |
| 193 | text-align: right; |
| 194 | } |
| 195 | |
| 196 | div.verseblock > pre.content { |
| 197 | font-family: inherit; |
| 198 | font-size: inherit; |
| 199 | } |
| 200 | div.verseblock > div.attribution { |
| 201 | padding-top: 0.75em; |
| 202 | text-align: left; |
| 203 | } |
| 204 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
| 205 | div.verseblock + div.attribution { |
| 206 | text-align: left; |
| 207 | } |
| 208 | |
| 209 | div.admonitionblock .icon { |
| 210 | vertical-align: top; |
| 211 | font-size: 1.1em; |
| 212 | font-weight: bold; |
| 213 | text-decoration: underline; |
| 214 | color: #527bbd; |
| 215 | padding-right: 0.5em; |
| 216 | } |
| 217 | div.admonitionblock td.content { |
| 218 | padding-left: 0.5em; |
| 219 | border-left: 3px solid #dddddd; |
| 220 | } |
| 221 | |
| 222 | div.exampleblock > div.content { |
| 223 | border-left: 3px solid #dddddd; |
| 224 | padding-left: 0.5em; |
| 225 | } |
| 226 | |
| 227 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 228 | span.image img { border-style: none; vertical-align: text-bottom; } |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 229 | a.image:visited { color: white; } |
| 230 | |
| 231 | dl { |
| 232 | margin-top: 0.8em; |
| 233 | margin-bottom: 0.8em; |
| 234 | } |
| 235 | dt { |
| 236 | margin-top: 0.5em; |
| 237 | margin-bottom: 0; |
| 238 | font-style: normal; |
| 239 | color: navy; |
| 240 | } |
| 241 | dd > *:first-child { |
| 242 | margin-top: 0.1em; |
| 243 | } |
| 244 | |
| 245 | ul, ol { |
| 246 | list-style-position: outside; |
| 247 | } |
| 248 | ol.arabic { |
| 249 | list-style-type: decimal; |
| 250 | } |
| 251 | ol.loweralpha { |
| 252 | list-style-type: lower-alpha; |
| 253 | } |
| 254 | ol.upperalpha { |
| 255 | list-style-type: upper-alpha; |
| 256 | } |
| 257 | ol.lowerroman { |
| 258 | list-style-type: lower-roman; |
| 259 | } |
| 260 | ol.upperroman { |
| 261 | list-style-type: upper-roman; |
| 262 | } |
| 263 | |
| 264 | div.compact ul, div.compact ol, |
| 265 | div.compact p, div.compact p, |
| 266 | div.compact div, div.compact div { |
| 267 | margin-top: 0.1em; |
| 268 | margin-bottom: 0.1em; |
| 269 | } |
| 270 | |
| 271 | tfoot { |
| 272 | font-weight: bold; |
| 273 | } |
| 274 | td > div.verse { |
| 275 | white-space: pre; |
| 276 | } |
| 277 | |
| 278 | div.hdlist { |
| 279 | margin-top: 0.8em; |
| 280 | margin-bottom: 0.8em; |
| 281 | } |
| 282 | div.hdlist tr { |
| 283 | padding-bottom: 15px; |
| 284 | } |
| 285 | dt.hdlist1.strong, td.hdlist1.strong { |
| 286 | font-weight: bold; |
| 287 | } |
| 288 | td.hdlist1 { |
| 289 | vertical-align: top; |
| 290 | font-style: normal; |
| 291 | padding-right: 0.8em; |
| 292 | color: navy; |
| 293 | } |
| 294 | td.hdlist2 { |
| 295 | vertical-align: top; |
| 296 | } |
| 297 | div.hdlist.compact tr { |
| 298 | margin: 0; |
| 299 | padding-bottom: 0; |
| 300 | } |
| 301 | |
| 302 | .comment { |
| 303 | background: yellow; |
| 304 | } |
| 305 | |
| 306 | .footnote, .footnoteref { |
| 307 | font-size: 0.8em; |
| 308 | } |
| 309 | |
| 310 | span.footnote, span.footnoteref { |
| 311 | vertical-align: super; |
| 312 | } |
| 313 | |
| 314 | #footnotes { |
| 315 | margin: 20px 0 20px 0; |
| 316 | padding: 7px 0 0 0; |
| 317 | } |
| 318 | |
| 319 | #footnotes div.footnote { |
| 320 | margin: 0 0 5px 0; |
| 321 | } |
| 322 | |
| 323 | #footnotes hr { |
| 324 | border: none; |
| 325 | border-top: 1px solid silver; |
| 326 | height: 1px; |
| 327 | text-align: left; |
| 328 | margin-left: 0; |
| 329 | width: 20%; |
| 330 | min-width: 100px; |
| 331 | } |
| 332 | |
| 333 | div.colist td { |
| 334 | padding-right: 0.5em; |
| 335 | padding-bottom: 0.3em; |
| 336 | vertical-align: top; |
| 337 | } |
| 338 | div.colist td img { |
| 339 | margin-top: 0.3em; |
| 340 | } |
| 341 | |
| 342 | @media print { |
| 343 | #footer-badges { display: none; } |
| 344 | } |
| 345 | |
| 346 | #toc { |
| 347 | margin-bottom: 2.5em; |
| 348 | } |
| 349 | |
| 350 | #toctitle { |
| 351 | color: #527bbd; |
| 352 | font-size: 1.1em; |
| 353 | font-weight: bold; |
| 354 | margin-top: 1.0em; |
| 355 | margin-bottom: 0.1em; |
| 356 | } |
| 357 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 358 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 359 | margin-top: 0; |
| 360 | margin-bottom: 0; |
| 361 | } |
| 362 | div.toclevel2 { |
| 363 | margin-left: 2em; |
| 364 | font-size: 0.9em; |
| 365 | } |
| 366 | div.toclevel3 { |
| 367 | margin-left: 4em; |
| 368 | font-size: 0.9em; |
| 369 | } |
| 370 | div.toclevel4 { |
| 371 | margin-left: 6em; |
| 372 | font-size: 0.9em; |
| 373 | } |
| 374 | |
| 375 | span.aqua { color: aqua; } |
| 376 | span.black { color: black; } |
| 377 | span.blue { color: blue; } |
| 378 | span.fuchsia { color: fuchsia; } |
| 379 | span.gray { color: gray; } |
| 380 | span.green { color: green; } |
| 381 | span.lime { color: lime; } |
| 382 | span.maroon { color: maroon; } |
| 383 | span.navy { color: navy; } |
| 384 | span.olive { color: olive; } |
| 385 | span.purple { color: purple; } |
| 386 | span.red { color: red; } |
| 387 | span.silver { color: silver; } |
| 388 | span.teal { color: teal; } |
| 389 | span.white { color: white; } |
| 390 | span.yellow { color: yellow; } |
| 391 | |
| 392 | span.aqua-background { background: aqua; } |
| 393 | span.black-background { background: black; } |
| 394 | span.blue-background { background: blue; } |
| 395 | span.fuchsia-background { background: fuchsia; } |
| 396 | span.gray-background { background: gray; } |
| 397 | span.green-background { background: green; } |
| 398 | span.lime-background { background: lime; } |
| 399 | span.maroon-background { background: maroon; } |
| 400 | span.navy-background { background: navy; } |
| 401 | span.olive-background { background: olive; } |
| 402 | span.purple-background { background: purple; } |
| 403 | span.red-background { background: red; } |
| 404 | span.silver-background { background: silver; } |
| 405 | span.teal-background { background: teal; } |
| 406 | span.white-background { background: white; } |
| 407 | span.yellow-background { background: yellow; } |
| 408 | |
| 409 | span.big { font-size: 2em; } |
| 410 | span.small { font-size: 0.6em; } |
| 411 | |
| 412 | span.underline { text-decoration: underline; } |
| 413 | span.overline { text-decoration: overline; } |
| 414 | span.line-through { text-decoration: line-through; } |
| 415 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 416 | div.unbreakable { page-break-inside: avoid; } |
| 417 | |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 418 | |
| 419 | /* |
| 420 | * xhtml11 specific |
| 421 | * |
| 422 | * */ |
| 423 | |
| 424 | div.tableblock { |
| 425 | margin-top: 1.0em; |
| 426 | margin-bottom: 1.5em; |
| 427 | } |
| 428 | div.tableblock > table { |
| 429 | border: 3px solid #527bbd; |
| 430 | } |
| 431 | thead, p.table.header { |
| 432 | font-weight: bold; |
| 433 | color: #527bbd; |
| 434 | } |
| 435 | p.table { |
| 436 | margin-top: 0; |
| 437 | } |
| 438 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 439 | div.tableblock > table[frame="void"] { |
| 440 | border-style: none; |
| 441 | } |
| 442 | div.tableblock > table[frame="hsides"] { |
| 443 | border-left-style: none; |
| 444 | border-right-style: none; |
| 445 | } |
| 446 | div.tableblock > table[frame="vsides"] { |
| 447 | border-top-style: none; |
| 448 | border-bottom-style: none; |
| 449 | } |
| 450 | |
| 451 | |
| 452 | /* |
| 453 | * html5 specific |
| 454 | * |
| 455 | * */ |
| 456 | |
| 457 | table.tableblock { |
| 458 | margin-top: 1.0em; |
| 459 | margin-bottom: 1.5em; |
| 460 | } |
| 461 | thead, p.tableblock.header { |
| 462 | font-weight: bold; |
| 463 | color: #527bbd; |
| 464 | } |
| 465 | p.tableblock { |
| 466 | margin-top: 0; |
| 467 | } |
| 468 | table.tableblock { |
| 469 | border-width: 3px; |
| 470 | border-spacing: 0px; |
| 471 | border-style: solid; |
| 472 | border-color: #527bbd; |
| 473 | border-collapse: collapse; |
| 474 | } |
| 475 | th.tableblock, td.tableblock { |
| 476 | border-width: 1px; |
| 477 | padding: 4px; |
| 478 | border-style: solid; |
| 479 | border-color: #527bbd; |
| 480 | } |
| 481 | |
| 482 | table.tableblock.frame-topbot { |
| 483 | border-left-style: hidden; |
| 484 | border-right-style: hidden; |
| 485 | } |
| 486 | table.tableblock.frame-sides { |
| 487 | border-top-style: hidden; |
| 488 | border-bottom-style: hidden; |
| 489 | } |
| 490 | table.tableblock.frame-none { |
| 491 | border-style: hidden; |
| 492 | } |
| 493 | |
| 494 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 495 | text-align: left; |
| 496 | } |
| 497 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 498 | text-align: center; |
| 499 | } |
| 500 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 501 | text-align: right; |
| 502 | } |
| 503 | |
| 504 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 505 | vertical-align: top; |
| 506 | } |
| 507 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 508 | vertical-align: middle; |
| 509 | } |
| 510 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 511 | vertical-align: bottom; |
| 512 | } |
| 513 | |
| 514 | |
| 515 | /* |
| 516 | * manpage specific |
| 517 | * |
| 518 | * */ |
| 519 | |
| 520 | body.manpage h1 { |
| 521 | padding-top: 0.5em; |
| 522 | padding-bottom: 0.5em; |
| 523 | border-top: 2px solid silver; |
| 524 | border-bottom: 2px solid silver; |
| 525 | } |
| 526 | body.manpage h2 { |
| 527 | border-style: none; |
| 528 | } |
| 529 | body.manpage div.sectionbody { |
| 530 | margin-left: 3em; |
| 531 | } |
| 532 | |
| 533 | @media print { |
| 534 | body.manpage div#toc { display: none; } |
| 535 | } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 536 | |
| 537 | |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 538 | </style> |
| 539 | <script type="text/javascript"> |
| 540 | /*<![CDATA[*/ |
| 541 | var asciidoc = { // Namespace. |
| 542 | |
| 543 | ///////////////////////////////////////////////////////////////////// |
| 544 | // Table Of Contents generator |
| 545 | ///////////////////////////////////////////////////////////////////// |
| 546 | |
| 547 | /* Author: Mihai Bazon, September 2002 |
| 548 | * http://students.infoiasi.ro/~mishoo |
| 549 | * |
| 550 | * Table Of Content generator |
| 551 | * Version: 0.4 |
| 552 | * |
| 553 | * Feel free to use this script under the terms of the GNU General Public |
| 554 | * License, as long as you do not remove or alter this notice. |
| 555 | */ |
| 556 | |
| 557 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 558 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 559 | |
| 560 | // toclevels = 1..4. |
| 561 | toc: function (toclevels) { |
| 562 | |
| 563 | function getText(el) { |
| 564 | var text = ""; |
| 565 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 566 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 567 | text += i.data; |
| 568 | else if (i.firstChild != null) |
| 569 | text += getText(i); |
| 570 | } |
| 571 | return text; |
| 572 | } |
| 573 | |
| 574 | function TocEntry(el, text, toclevel) { |
| 575 | this.element = el; |
| 576 | this.text = text; |
| 577 | this.toclevel = toclevel; |
| 578 | } |
| 579 | |
| 580 | function tocEntries(el, toclevels) { |
| 581 | var result = new Array; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 582 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 583 | // Function that scans the DOM tree for header elements (the DOM2 |
| 584 | // nodeIterator API would be a better technique but not supported by all |
| 585 | // browsers). |
| 586 | var iterate = function (el) { |
| 587 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 588 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 589 | var mo = re.exec(i.tagName); |
| 590 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 591 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 592 | } |
| 593 | iterate(i); |
| 594 | } |
| 595 | } |
| 596 | } |
| 597 | iterate(el); |
| 598 | return result; |
| 599 | } |
| 600 | |
| 601 | var toc = document.getElementById("toc"); |
| 602 | if (!toc) { |
| 603 | return; |
| 604 | } |
| 605 | |
| 606 | // Delete existing TOC entries in case we're reloading the TOC. |
| 607 | var tocEntriesToRemove = []; |
| 608 | var i; |
| 609 | for (i = 0; i < toc.childNodes.length; i++) { |
| 610 | var entry = toc.childNodes[i]; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 611 | if (entry.nodeName.toLowerCase() == 'div' |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 612 | && entry.getAttribute("class") |
| 613 | && entry.getAttribute("class").match(/^toclevel/)) |
| 614 | tocEntriesToRemove.push(entry); |
| 615 | } |
| 616 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 617 | toc.removeChild(tocEntriesToRemove[i]); |
| 618 | } |
| 619 | |
| 620 | // Rebuild TOC entries. |
| 621 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 622 | for (var i = 0; i < entries.length; ++i) { |
| 623 | var entry = entries[i]; |
| 624 | if (entry.element.id == "") |
| 625 | entry.element.id = "_toc_" + i; |
| 626 | var a = document.createElement("a"); |
| 627 | a.href = "#" + entry.element.id; |
| 628 | a.appendChild(document.createTextNode(entry.text)); |
| 629 | var div = document.createElement("div"); |
| 630 | div.appendChild(a); |
| 631 | div.className = "toclevel" + entry.toclevel; |
| 632 | toc.appendChild(div); |
| 633 | } |
| 634 | if (entries.length == 0) |
| 635 | toc.parentNode.removeChild(toc); |
| 636 | }, |
| 637 | |
| 638 | |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | // Footnotes generator |
| 641 | ///////////////////////////////////////////////////////////////////// |
| 642 | |
| 643 | /* Based on footnote generation code from: |
| 644 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 645 | */ |
| 646 | |
| 647 | footnotes: function () { |
| 648 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 649 | var i; |
| 650 | var noteholder = document.getElementById("footnotes"); |
| 651 | if (!noteholder) { |
| 652 | return; |
| 653 | } |
| 654 | var entriesToRemove = []; |
| 655 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 656 | var entry = noteholder.childNodes[i]; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 657 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 658 | entriesToRemove.push(entry); |
| 659 | } |
| 660 | for (i = 0; i < entriesToRemove.length; i++) { |
| 661 | noteholder.removeChild(entriesToRemove[i]); |
| 662 | } |
| 663 | |
| 664 | // Rebuild footnote entries. |
| 665 | var cont = document.getElementById("content"); |
| 666 | var spans = cont.getElementsByTagName("span"); |
| 667 | var refs = {}; |
| 668 | var n = 0; |
| 669 | for (i=0; i<spans.length; i++) { |
| 670 | if (spans[i].className == "footnote") { |
| 671 | n++; |
| 672 | var note = spans[i].getAttribute("data-note"); |
| 673 | if (!note) { |
| 674 | // Use [\s\S] in place of . so multi-line matches work. |
| 675 | // Because JavaScript has no s (dotall) regex flag. |
| 676 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 677 | spans[i].innerHTML = |
| 678 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 679 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 680 | spans[i].setAttribute("data-note", note); |
| 681 | } |
| 682 | noteholder.innerHTML += |
| 683 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 684 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 685 | n + "</a>. " + note + "</div>"; |
| 686 | var id =spans[i].getAttribute("id"); |
| 687 | if (id != null) refs["#"+id] = n; |
| 688 | } |
| 689 | } |
| 690 | if (n == 0) |
| 691 | noteholder.parentNode.removeChild(noteholder); |
| 692 | else { |
| 693 | // Process footnoterefs. |
| 694 | for (i=0; i<spans.length; i++) { |
| 695 | if (spans[i].className == "footnoteref") { |
| 696 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 697 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 698 | n = refs[href]; |
| 699 | spans[i].innerHTML = |
| 700 | "[<a href='#_footnote_" + n + |
| 701 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 702 | } |
| 703 | } |
| 704 | } |
| 705 | }, |
| 706 | |
| 707 | install: function(toclevels) { |
| 708 | var timerId; |
| 709 | |
| 710 | function reinstall() { |
| 711 | asciidoc.footnotes(); |
| 712 | if (toclevels) { |
| 713 | asciidoc.toc(toclevels); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | function reinstallAndRemoveTimer() { |
| 718 | clearInterval(timerId); |
| 719 | reinstall(); |
| 720 | } |
| 721 | |
| 722 | timerId = setInterval(reinstall, 500); |
| 723 | if (document.addEventListener) |
| 724 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 725 | else |
| 726 | window.onload = reinstallAndRemoveTimer; |
| 727 | } |
| 728 | |
| 729 | } |
| 730 | asciidoc.install(); |
| 731 | /*]]>*/ |
| 732 | </script> |
| 733 | </head> |
| 734 | <body class="manpage"> |
| 735 | <div id="header"> |
| 736 | <h1> |
| 737 | gitremote-helpers(1) Manual Page |
| 738 | </h1> |
| 739 | <h2>NAME</h2> |
| 740 | <div class="sectionbody"> |
| 741 | <p>gitremote-helpers - |
| 742 | Helper programs to interact with remote repositories |
| 743 | </p> |
| 744 | </div> |
| 745 | </div> |
| 746 | <div id="content"> |
| 747 | <div class="sect1"> |
| 748 | <h2 id="_synopsis">SYNOPSIS</h2> |
| 749 | <div class="sectionbody"> |
| 750 | <div class="verseblock"> |
| 751 | <pre class="content"><em>git remote-<transport></em> <repository> [<URL>]</pre> |
| 752 | <div class="attribution"> |
| 753 | </div></div> |
| 754 | </div> |
| 755 | </div> |
| 756 | <div class="sect1"> |
| 757 | <h2 id="_description">DESCRIPTION</h2> |
| 758 | <div class="sectionbody"> |
| 759 | <div class="paragraph"><p>Remote helper programs are normally not used directly by end users, |
| 760 | but they are invoked by Git when it needs to interact with remote |
| 761 | repositories Git does not support natively. A given helper will |
| 762 | implement a subset of the capabilities documented here. When Git |
| 763 | needs to interact with a repository using a remote helper, it spawns |
| 764 | the helper as an independent process, sends commands to the helper’s |
| 765 | standard input, and expects results from the helper’s standard |
| 766 | output. Because a remote helper runs as an independent process from |
| 767 | Git, there is no need to re-link Git to add a new helper, nor any |
| 768 | need to link the helper with the implementation of Git.</p></div> |
| 769 | <div class="paragraph"><p>Every helper must support the "capabilities" command, which Git |
| 770 | uses to determine what other commands the helper will accept. Those |
| 771 | other commands can be used to discover and update remote refs, |
| 772 | transport objects between the object database and the remote repository, |
| 773 | and update the local object store.</p></div> |
| 774 | <div class="paragraph"><p>Git comes with a "curl" family of remote helpers, that handle various |
| 775 | transport protocols, such as <em>git-remote-http</em>, <em>git-remote-https</em>, |
| 776 | <em>git-remote-ftp</em> and <em>git-remote-ftps</em>. They implement the capabilities |
| 777 | <em>fetch</em>, <em>option</em>, and <em>push</em>.</p></div> |
| 778 | </div> |
| 779 | </div> |
| 780 | <div class="sect1"> |
| 781 | <h2 id="_invocation">INVOCATION</h2> |
| 782 | <div class="sectionbody"> |
| 783 | <div class="paragraph"><p>Remote helper programs are invoked with one or (optionally) two |
| 784 | arguments. The first argument specifies a remote repository as in Git; |
| 785 | it is either the name of a configured remote or a URL. The second |
| 786 | argument specifies a URL; it is usually of the form |
| 787 | <em><transport>://<address></em>, but any arbitrary string is possible. |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 788 | The <code>GIT_DIR</code> environment variable is set up for the remote helper |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 789 | and can be used to determine where to store additional data or from |
| 790 | which directory to invoke auxiliary Git commands.</p></div> |
| 791 | <div class="paragraph"><p>When Git encounters a URL of the form <em><transport>://<address></em>, where |
| 792 | <em><transport></em> is a protocol that it cannot handle natively, it |
| 793 | automatically invokes <em>git remote-<transport></em> with the full URL as |
| 794 | the second argument. If such a URL is encountered directly on the |
| 795 | command line, the first argument is the same as the second, and if it |
| 796 | is encountered in a configured remote, the first argument is the name |
| 797 | of that remote.</p></div> |
| 798 | <div class="paragraph"><p>A URL of the form <em><transport>::<address></em> explicitly instructs Git to |
| 799 | invoke <em>git remote-<transport></em> with <em><address></em> as the second |
| 800 | argument. If such a URL is encountered directly on the command line, |
| 801 | the first argument is <em><address></em>, and if it is encountered in a |
| 802 | configured remote, the first argument is the name of that remote.</p></div> |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 803 | <div class="paragraph"><p>Additionally, when a configured remote has <code>remote.<name>.vcs</code> set to |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 804 | <em><transport></em>, Git explicitly invokes <em>git remote-<transport></em> with |
| 805 | <em><name></em> as the first argument. If set, the second argument is |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 806 | <code>remote.<name>.url</code>; otherwise, the second argument is omitted.</p></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 807 | </div> |
| 808 | </div> |
| 809 | <div class="sect1"> |
| 810 | <h2 id="_input_format">INPUT FORMAT</h2> |
| 811 | <div class="sectionbody"> |
| 812 | <div class="paragraph"><p>Git sends the remote helper a list of commands on standard input, one |
| 813 | per line. The first command is always the <em>capabilities</em> command, in |
| 814 | response to which the remote helper must print a list of the |
| 815 | capabilities it supports (see below) followed by a blank line. The |
| 816 | response to the capabilities command determines what commands Git uses |
| 817 | in the remainder of the command stream.</p></div> |
| 818 | <div class="paragraph"><p>The command stream is terminated by a blank line. In some cases |
| 819 | (indicated in the documentation of the relevant commands), this blank |
| 820 | line is followed by a payload in some other protocol (e.g., the pack |
| 821 | protocol), while in others it indicates the end of input.</p></div> |
| 822 | <div class="sect2"> |
| 823 | <h3 id="_capabilities">Capabilities</h3> |
| 824 | <div class="paragraph"><p>Each remote helper is expected to support only a subset of commands. |
| 825 | The operations a helper supports are declared to Git in the response |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 826 | to the <code>capabilities</code> command (see COMMANDS, below).</p></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 827 | <div class="paragraph"><p>In the following, we list all defined capabilities and for |
| 828 | each we list which commands a helper with that capability |
| 829 | must provide.</p></div> |
| 830 | <div class="sect3"> |
| 831 | <h4 id="_capabilities_for_pushing">Capabilities for Pushing</h4> |
| 832 | <div class="dlist"><dl> |
| 833 | <dt class="hdlist1"> |
| 834 | <em>connect</em> |
| 835 | </dt> |
| 836 | <dd> |
| 837 | <p> |
| 838 | Can attempt to connect to <em>git receive-pack</em> (for pushing), |
| 839 | <em>git upload-pack</em>, etc for communication using |
| 840 | git’s native packfile protocol. This |
| 841 | requires a bidirectional, full-duplex connection. |
| 842 | </p> |
| 843 | <div class="paragraph"><p>Supported commands: <em>connect</em>.</p></div> |
| 844 | </dd> |
| 845 | <dt class="hdlist1"> |
| 846 | <em>push</em> |
| 847 | </dt> |
| 848 | <dd> |
| 849 | <p> |
| 850 | Can discover remote refs and push local commits and the |
| 851 | history leading up to them to new or existing remote refs. |
| 852 | </p> |
| 853 | <div class="paragraph"><p>Supported commands: <em>list for-push</em>, <em>push</em>.</p></div> |
| 854 | </dd> |
| 855 | <dt class="hdlist1"> |
| 856 | <em>export</em> |
| 857 | </dt> |
| 858 | <dd> |
| 859 | <p> |
| 860 | Can discover remote refs and push specified objects from a |
| 861 | fast-import stream to remote refs. |
| 862 | </p> |
| 863 | <div class="paragraph"><p>Supported commands: <em>list for-push</em>, <em>export</em>.</p></div> |
| 864 | </dd> |
| 865 | </dl></div> |
| 866 | <div class="paragraph"><p>If a helper advertises <em>connect</em>, Git will use it if possible and |
| 867 | fall back to another capability if the helper requests so when |
| 868 | connecting (see the <em>connect</em> command under COMMANDS). |
| 869 | When choosing between <em>push</em> and <em>export</em>, Git prefers <em>push</em>. |
| 870 | Other frontends may have some other order of preference.</p></div> |
Junio C Hamano | 0e0e0d2 | 2013-09-12 23:25:03 | [diff] [blame] | 871 | <div class="dlist"><dl> |
| 872 | <dt class="hdlist1"> |
| 873 | <em>no-private-update</em> |
| 874 | </dt> |
| 875 | <dd> |
| 876 | <p> |
| 877 | When using the <em>refspec</em> capability, git normally updates the |
| 878 | private ref on successful push. This update is disabled when |
| 879 | the remote-helper declares the capability <em>no-private-update</em>. |
| 880 | </p> |
| 881 | </dd> |
| 882 | </dl></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 883 | </div> |
| 884 | <div class="sect3"> |
| 885 | <h4 id="_capabilities_for_fetching">Capabilities for Fetching</h4> |
| 886 | <div class="dlist"><dl> |
| 887 | <dt class="hdlist1"> |
| 888 | <em>connect</em> |
| 889 | </dt> |
| 890 | <dd> |
| 891 | <p> |
| 892 | Can try to connect to <em>git upload-pack</em> (for fetching), |
| 893 | <em>git receive-pack</em>, etc for communication using the |
| 894 | Git’s native packfile protocol. This |
| 895 | requires a bidirectional, full-duplex connection. |
| 896 | </p> |
| 897 | <div class="paragraph"><p>Supported commands: <em>connect</em>.</p></div> |
| 898 | </dd> |
| 899 | <dt class="hdlist1"> |
| 900 | <em>fetch</em> |
| 901 | </dt> |
| 902 | <dd> |
| 903 | <p> |
| 904 | Can discover remote refs and transfer objects reachable from |
| 905 | them to the local object store. |
| 906 | </p> |
| 907 | <div class="paragraph"><p>Supported commands: <em>list</em>, <em>fetch</em>.</p></div> |
| 908 | </dd> |
| 909 | <dt class="hdlist1"> |
| 910 | <em>import</em> |
| 911 | </dt> |
| 912 | <dd> |
| 913 | <p> |
| 914 | Can discover remote refs and output objects reachable from |
| 915 | them as a stream in fast-import format. |
| 916 | </p> |
| 917 | <div class="paragraph"><p>Supported commands: <em>list</em>, <em>import</em>.</p></div> |
| 918 | </dd> |
Junio C Hamano | 8eac268 | 2013-09-09 22:35:20 | [diff] [blame] | 919 | <dt class="hdlist1"> |
| 920 | <em>check-connectivity</em> |
| 921 | </dt> |
| 922 | <dd> |
| 923 | <p> |
| 924 | Can guarantee that when a clone is requested, the received |
| 925 | pack is self contained and is connected. |
| 926 | </p> |
| 927 | </dd> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 928 | </dl></div> |
| 929 | <div class="paragraph"><p>If a helper advertises <em>connect</em>, Git will use it if possible and |
| 930 | fall back to another capability if the helper requests so when |
| 931 | connecting (see the <em>connect</em> command under COMMANDS). |
| 932 | When choosing between <em>fetch</em> and <em>import</em>, Git prefers <em>fetch</em>. |
| 933 | Other frontends may have some other order of preference.</p></div> |
| 934 | </div> |
| 935 | <div class="sect3"> |
| 936 | <h4 id="_miscellaneous_capabilities">Miscellaneous capabilities</h4> |
| 937 | <div class="dlist"><dl> |
| 938 | <dt class="hdlist1"> |
| 939 | <em>option</em> |
| 940 | </dt> |
| 941 | <dd> |
| 942 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 943 | For specifying settings like <code>verbosity</code> (how much output to |
| 944 | write to stderr) and <code>depth</code> (how much history is wanted in the |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 945 | case of a shallow clone) that affect how other commands are |
| 946 | carried out. |
| 947 | </p> |
| 948 | </dd> |
| 949 | <dt class="hdlist1"> |
| 950 | <em>refspec</em> <refspec> |
| 951 | </dt> |
| 952 | <dd> |
| 953 | <p> |
Junio C Hamano | c710296 | 2013-05-29 23:57:17 | [diff] [blame] | 954 | For remote helpers that implement <em>import</em> or <em>export</em>, this capability |
| 955 | allows the refs to be constrained to a private namespace, instead of |
| 956 | writing to refs/heads or refs/remotes directly. |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 957 | It is recommended that all importers providing the <em>import</em> |
Junio C Hamano | c710296 | 2013-05-29 23:57:17 | [diff] [blame] | 958 | capability use this. It’s mandatory for <em>export</em>. |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 959 | </p> |
| 960 | <div class="paragraph"><p>A helper advertising the capability |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 961 | <code>refspec refs/heads/*:refs/svn/origin/branches/*</code> |
| 962 | is saying that, when it is asked to <code>import refs/heads/topic</code>, the |
| 963 | stream it outputs will update the <code>refs/svn/origin/branches/topic</code> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 964 | ref.</p></div> |
| 965 | <div class="paragraph"><p>This capability can be advertised multiple times. The first |
| 966 | applicable refspec takes precedence. The left-hand of refspecs |
| 967 | advertised with this capability must cover all refs reported by |
Junio C Hamano | c710296 | 2013-05-29 23:57:17 | [diff] [blame] | 968 | the list command. If no <em>refspec</em> capability is advertised, |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 969 | there is an implied <code>refspec *:*</code>.</p></div> |
Junio C Hamano | 0e0e0d2 | 2013-09-12 23:25:03 | [diff] [blame] | 970 | <div class="paragraph"><p>When writing remote-helpers for decentralized version control |
| 971 | systems, it is advised to keep a local copy of the repository to |
| 972 | interact with, and to let the private namespace refs point to this |
| 973 | local repository, while the refs/remotes namespace is used to track |
| 974 | the remote repository.</p></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 975 | </dd> |
| 976 | <dt class="hdlist1"> |
| 977 | <em>bidi-import</em> |
| 978 | </dt> |
| 979 | <dd> |
| 980 | <p> |
| 981 | This modifies the <em>import</em> capability. |
| 982 | The fast-import commands <em>cat-blob</em> and <em>ls</em> can be used by remote-helpers |
| 983 | to retrieve information about blobs and trees that already exist in |
| 984 | fast-import’s memory. This requires a channel from fast-import to the |
| 985 | remote-helper. |
| 986 | If it is advertised in addition to "import", Git establishes a pipe from |
| 987 | fast-import to the remote-helper’s stdin. |
| 988 | It follows that Git and fast-import are both connected to the |
| 989 | remote-helper’s stdin. Because Git can send multiple commands to |
| 990 | the remote-helper it is required that helpers that use <em>bidi-import</em> |
| 991 | buffer all <em>import</em> commands of a batch before sending data to fast-import. |
| 992 | This is to prevent mixing commands and fast-import responses on the |
| 993 | helper’s stdin. |
| 994 | </p> |
| 995 | </dd> |
| 996 | <dt class="hdlist1"> |
| 997 | <em>export-marks</em> <file> |
| 998 | </dt> |
| 999 | <dd> |
| 1000 | <p> |
| 1001 | This modifies the <em>export</em> capability, instructing Git to dump the |
| 1002 | internal marks table to <file> when complete. For details, |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1003 | read up on <code>--export-marks=<file></code> in <a href="git-fast-export.html">git-fast-export(1)</a>. |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1004 | </p> |
| 1005 | </dd> |
| 1006 | <dt class="hdlist1"> |
| 1007 | <em>import-marks</em> <file> |
| 1008 | </dt> |
| 1009 | <dd> |
| 1010 | <p> |
| 1011 | This modifies the <em>export</em> capability, instructing Git to load the |
| 1012 | marks specified in <file> before processing any input. For details, |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1013 | read up on <code>--import-marks=<file></code> in <a href="git-fast-export.html">git-fast-export(1)</a>. |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1014 | </p> |
| 1015 | </dd> |
Junio C Hamano | ac002b6 | 2013-04-25 01:02:58 | [diff] [blame] | 1016 | <dt class="hdlist1"> |
| 1017 | <em>signed-tags</em> |
| 1018 | </dt> |
| 1019 | <dd> |
| 1020 | <p> |
| 1021 | This modifies the <em>export</em> capability, instructing Git to pass |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1022 | <code>--signed-tags=verbatim</code> to <a href="git-fast-export.html">git-fast-export(1)</a>. In the |
| 1023 | absence of this capability, Git will use <code>--signed-tags=warn-strip</code>. |
Junio C Hamano | ac002b6 | 2013-04-25 01:02:58 | [diff] [blame] | 1024 | </p> |
| 1025 | </dd> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1026 | </dl></div> |
| 1027 | </div> |
| 1028 | </div> |
| 1029 | </div> |
| 1030 | </div> |
| 1031 | <div class="sect1"> |
| 1032 | <h2 id="_commands">COMMANDS</h2> |
| 1033 | <div class="sectionbody"> |
| 1034 | <div class="paragraph"><p>Commands are given by the caller on the helper’s standard input, one per line.</p></div> |
| 1035 | <div class="dlist"><dl> |
| 1036 | <dt class="hdlist1"> |
| 1037 | <em>capabilities</em> |
| 1038 | </dt> |
| 1039 | <dd> |
| 1040 | <p> |
| 1041 | Lists the capabilities of the helper, one per line, ending |
| 1042 | with a blank line. Each capability may be preceded with <em>*</em>, |
| 1043 | which marks them mandatory for Git versions using the remote |
| 1044 | helper to understand. Any unknown mandatory capability is a |
| 1045 | fatal error. |
| 1046 | </p> |
| 1047 | <div class="paragraph"><p>Support for this command is mandatory.</p></div> |
| 1048 | </dd> |
| 1049 | <dt class="hdlist1"> |
| 1050 | <em>list</em> |
| 1051 | </dt> |
| 1052 | <dd> |
| 1053 | <p> |
| 1054 | Lists the refs, one per line, in the format "<value> <name> |
| 1055 | [<attr> …]". The value may be a hex sha1 hash, "@<dest>" for |
| 1056 | a symref, or "?" to indicate that the helper could not get the |
| 1057 | value of the ref. A space-separated list of attributes follows |
| 1058 | the name; unrecognized attributes are ignored. The list ends |
| 1059 | with a blank line. |
| 1060 | </p> |
| 1061 | <div class="paragraph"><p>See REF LIST ATTRIBUTES for a list of currently defined attributes.</p></div> |
| 1062 | <div class="paragraph"><p>Supported if the helper has the "fetch" or "import" capability.</p></div> |
| 1063 | </dd> |
| 1064 | <dt class="hdlist1"> |
| 1065 | <em>list for-push</em> |
| 1066 | </dt> |
| 1067 | <dd> |
| 1068 | <p> |
| 1069 | Similar to <em>list</em>, except that it is used if and only if |
| 1070 | the caller wants to the resulting ref list to prepare |
| 1071 | push commands. |
| 1072 | A helper supporting both push and fetch can use this |
| 1073 | to distinguish for which operation the output of <em>list</em> |
| 1074 | is going to be used, possibly reducing the amount |
| 1075 | of work that needs to be performed. |
| 1076 | </p> |
| 1077 | <div class="paragraph"><p>Supported if the helper has the "push" or "export" capability.</p></div> |
| 1078 | </dd> |
| 1079 | <dt class="hdlist1"> |
| 1080 | <em>option</em> <name> <value> |
| 1081 | </dt> |
| 1082 | <dd> |
| 1083 | <p> |
| 1084 | Sets the transport helper option <name> to <value>. Outputs a |
| 1085 | single line containing one of <em>ok</em> (option successfully set), |
| 1086 | <em>unsupported</em> (option not recognized) or <em>error <msg></em> |
| 1087 | (option <name> is supported but <value> is not valid |
| 1088 | for it). Options should be set before other commands, |
| 1089 | and may influence the behavior of those commands. |
| 1090 | </p> |
| 1091 | <div class="paragraph"><p>See OPTIONS for a list of currently defined options.</p></div> |
| 1092 | <div class="paragraph"><p>Supported if the helper has the "option" capability.</p></div> |
| 1093 | </dd> |
| 1094 | <dt class="hdlist1"> |
| 1095 | <em>fetch</em> <sha1> <name> |
| 1096 | </dt> |
| 1097 | <dd> |
| 1098 | <p> |
| 1099 | Fetches the given object, writing the necessary objects |
| 1100 | to the database. Fetch commands are sent in a batch, one |
| 1101 | per line, terminated with a blank line. |
| 1102 | Outputs a single blank line when all fetch commands in the |
| 1103 | same batch are complete. Only objects which were reported |
| 1104 | in the output of <em>list</em> with a sha1 may be fetched this way. |
| 1105 | </p> |
| 1106 | <div class="paragraph"><p>Optionally may output a <em>lock <file></em> line indicating a file under |
| 1107 | GIT_DIR/objects/pack which is keeping a pack until refs can be |
| 1108 | suitably updated.</p></div> |
Junio C Hamano | 8eac268 | 2013-09-09 22:35:20 | [diff] [blame] | 1109 | <div class="paragraph"><p>If option <em>check-connectivity</em> is requested, the helper must output |
| 1110 | <em>connectivity-ok</em> if the clone is self-contained and connected.</p></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1111 | <div class="paragraph"><p>Supported if the helper has the "fetch" capability.</p></div> |
| 1112 | </dd> |
| 1113 | <dt class="hdlist1"> |
| 1114 | <em>push</em> +<src>:<dst> |
| 1115 | </dt> |
| 1116 | <dd> |
| 1117 | <p> |
| 1118 | Pushes the given local <src> commit or branch to the |
| 1119 | remote branch described by <dst>. A batch sequence of |
| 1120 | one or more <em>push</em> commands is terminated with a blank line |
| 1121 | (if there is only one reference to push, a single <em>push</em> command |
| 1122 | is followed by a blank line). For example, the following would |
| 1123 | be two batches of <em>push</em>, the first asking the remote-helper |
| 1124 | to push the local ref <em>master</em> to the remote ref <em>master</em> and |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1125 | the local <code>HEAD</code> to the remote <em>branch</em>, and the second |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1126 | asking to push ref <em>foo</em> to ref <em>bar</em> (forced update requested |
| 1127 | by the <em>+</em>). |
| 1128 | </p> |
| 1129 | <div class="listingblock"> |
| 1130 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1131 | <pre><code>push refs/heads/master:refs/heads/master |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1132 | push HEAD:refs/heads/branch |
| 1133 | \n |
| 1134 | push +refs/heads/foo:refs/heads/bar |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1135 | \n</code></pre> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1136 | </div></div> |
| 1137 | <div class="paragraph"><p>Zero or more protocol options may be entered after the last <em>push</em> |
| 1138 | command, before the batch’s terminating blank line.</p></div> |
| 1139 | <div class="paragraph"><p>When the push is complete, outputs one or more <em>ok <dst></em> or |
| 1140 | <em>error <dst> <why>?</em> lines to indicate success or failure of |
| 1141 | each pushed ref. The status report output is terminated by |
| 1142 | a blank line. The option field <why> may be quoted in a C |
| 1143 | style string if it contains an LF.</p></div> |
| 1144 | <div class="paragraph"><p>Supported if the helper has the "push" capability.</p></div> |
| 1145 | </dd> |
| 1146 | <dt class="hdlist1"> |
| 1147 | <em>import</em> <name> |
| 1148 | </dt> |
| 1149 | <dd> |
| 1150 | <p> |
| 1151 | Produces a fast-import stream which imports the current value |
| 1152 | of the named ref. It may additionally import other refs as |
| 1153 | needed to construct the history efficiently. The script writes |
| 1154 | to a helper-specific private namespace. The value of the named |
| 1155 | ref should be written to a location in this namespace derived |
| 1156 | by applying the refspecs from the "refspec" capability to the |
| 1157 | name of the ref. |
| 1158 | </p> |
| 1159 | <div class="paragraph"><p>Especially useful for interoperability with a foreign versioning |
| 1160 | system.</p></div> |
| 1161 | <div class="paragraph"><p>Just like <em>push</em>, a batch sequence of one or more <em>import</em> is |
| 1162 | terminated with a blank line. For each batch of <em>import</em>, the remote |
| 1163 | helper should produce a fast-import stream terminated by a <em>done</em> |
| 1164 | command.</p></div> |
| 1165 | <div class="paragraph"><p>Note that if the <em>bidi-import</em> capability is used the complete batch |
| 1166 | sequence has to be buffered before starting to send data to fast-import |
| 1167 | to prevent mixing of commands and fast-import responses on the helper’s |
| 1168 | stdin.</p></div> |
| 1169 | <div class="paragraph"><p>Supported if the helper has the "import" capability.</p></div> |
| 1170 | </dd> |
| 1171 | <dt class="hdlist1"> |
| 1172 | <em>export</em> |
| 1173 | </dt> |
| 1174 | <dd> |
| 1175 | <p> |
| 1176 | Instructs the remote helper that any subsequent input is |
| 1177 | part of a fast-import stream (generated by <em>git fast-export</em>) |
| 1178 | containing objects which should be pushed to the remote. |
| 1179 | </p> |
| 1180 | <div class="paragraph"><p>Especially useful for interoperability with a foreign versioning |
| 1181 | system.</p></div> |
| 1182 | <div class="paragraph"><p>The <em>export-marks</em> and <em>import-marks</em> capabilities, if specified, |
| 1183 | affect this command in so far as they are passed on to <em>git |
| 1184 | fast-export</em>, which then will load/store a table of marks for |
| 1185 | local objects. This can be used to implement for incremental |
| 1186 | operations.</p></div> |
| 1187 | <div class="paragraph"><p>Supported if the helper has the "export" capability.</p></div> |
| 1188 | </dd> |
| 1189 | <dt class="hdlist1"> |
| 1190 | <em>connect</em> <service> |
| 1191 | </dt> |
| 1192 | <dd> |
| 1193 | <p> |
| 1194 | Connects to given service. Standard input and standard output |
| 1195 | of helper are connected to specified service (git prefix is |
| 1196 | included in service name so e.g. fetching uses <em>git-upload-pack</em> |
| 1197 | as service) on remote side. Valid replies to this command are |
| 1198 | empty line (connection established), <em>fallback</em> (no smart |
| 1199 | transport support, fall back to dumb transports) and just |
| 1200 | exiting with error message printed (can’t connect, don’t |
| 1201 | bother trying to fall back). After line feed terminating the |
| 1202 | positive (empty) response, the output of service starts. After |
| 1203 | the connection ends, the remote helper exits. |
| 1204 | </p> |
| 1205 | <div class="paragraph"><p>Supported if the helper has the "connect" capability.</p></div> |
| 1206 | </dd> |
| 1207 | </dl></div> |
| 1208 | <div class="paragraph"><p>If a fatal error occurs, the program writes the error message to |
| 1209 | stderr and exits. The caller should expect that a suitable error |
| 1210 | message has been printed if the child closes the connection without |
| 1211 | completing a valid response for the current command.</p></div> |
| 1212 | <div class="paragraph"><p>Additional commands may be supported, as may be determined from |
| 1213 | capabilities reported by the helper.</p></div> |
| 1214 | </div> |
| 1215 | </div> |
| 1216 | <div class="sect1"> |
| 1217 | <h2 id="_ref_list_attributes">REF LIST ATTRIBUTES</h2> |
| 1218 | <div class="sectionbody"> |
| 1219 | <div class="paragraph"><p>The <em>list</em> command produces a list of refs in which each ref |
| 1220 | may be followed by a list of attributes. The following ref list |
| 1221 | attributes are defined.</p></div> |
| 1222 | <div class="dlist"><dl> |
| 1223 | <dt class="hdlist1"> |
| 1224 | <em>unchanged</em> |
| 1225 | </dt> |
| 1226 | <dd> |
| 1227 | <p> |
| 1228 | This ref is unchanged since the last import or fetch, although |
| 1229 | the helper cannot necessarily determine what value that produced. |
| 1230 | </p> |
| 1231 | </dd> |
| 1232 | </dl></div> |
| 1233 | </div> |
| 1234 | </div> |
| 1235 | <div class="sect1"> |
| 1236 | <h2 id="_options">OPTIONS</h2> |
| 1237 | <div class="sectionbody"> |
| 1238 | <div class="paragraph"><p>The following options are defined and (under suitable circumstances) |
| 1239 | set by Git if the remote helper has the <em>option</em> capability.</p></div> |
| 1240 | <div class="dlist"><dl> |
| 1241 | <dt class="hdlist1"> |
| 1242 | <em>option verbosity</em> <n> |
| 1243 | </dt> |
| 1244 | <dd> |
| 1245 | <p> |
| 1246 | Changes the verbosity of messages displayed by the helper. |
| 1247 | A value of 0 for <n> means that processes operate |
| 1248 | quietly, and the helper produces only error output. |
| 1249 | 1 is the default level of verbosity, and higher values |
| 1250 | of <n> correspond to the number of -v flags passed on the |
| 1251 | command line. |
| 1252 | </p> |
| 1253 | </dd> |
| 1254 | <dt class="hdlist1"> |
| 1255 | <em>option progress</em> {<em>true</em>|<em>false</em>} |
| 1256 | </dt> |
| 1257 | <dd> |
| 1258 | <p> |
| 1259 | Enables (or disables) progress messages displayed by the |
| 1260 | transport helper during a command. |
| 1261 | </p> |
| 1262 | </dd> |
| 1263 | <dt class="hdlist1"> |
| 1264 | <em>option depth</em> <depth> |
| 1265 | </dt> |
| 1266 | <dd> |
| 1267 | <p> |
| 1268 | Deepens the history of a shallow repository. |
| 1269 | </p> |
| 1270 | </dd> |
| 1271 | <dt class="hdlist1"> |
Junio C Hamano | 20829a4 | 2016-10-10 23:24:44 | [diff] [blame] | 1272 | 'option deepen-since <timestamp> |
| 1273 | </dt> |
| 1274 | <dd> |
| 1275 | <p> |
| 1276 | Deepens the history of a shallow repository based on time. |
| 1277 | </p> |
| 1278 | </dd> |
| 1279 | <dt class="hdlist1"> |
| 1280 | 'option deepen-not <ref> |
| 1281 | </dt> |
| 1282 | <dd> |
| 1283 | <p> |
| 1284 | Deepens the history of a shallow repository excluding ref. |
| 1285 | Multiple options add up. |
| 1286 | </p> |
| 1287 | </dd> |
| 1288 | <dt class="hdlist1"> |
| 1289 | <em>option deepen-relative {'true</em>|<em>false</em>} |
| 1290 | </dt> |
| 1291 | <dd> |
| 1292 | <p> |
| 1293 | Deepens the history of a shallow repository relative to |
| 1294 | current boundary. Only valid when used with "option depth". |
| 1295 | </p> |
| 1296 | </dd> |
| 1297 | <dt class="hdlist1"> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1298 | <em>option followtags</em> {<em>true</em>|<em>false</em>} |
| 1299 | </dt> |
| 1300 | <dd> |
| 1301 | <p> |
| 1302 | If enabled the helper should automatically fetch annotated |
| 1303 | tag objects if the object the tag points at was transferred |
| 1304 | during the fetch command. If the tag is not fetched by |
| 1305 | the helper a second fetch command will usually be sent to |
| 1306 | ask for the tag specifically. Some helpers may be able to |
| 1307 | use this option to avoid a second network connection. |
| 1308 | </p> |
| 1309 | </dd> |
| 1310 | </dl></div> |
| 1311 | <div class="paragraph"><p><em>option dry-run</em> {<em>true</em>|<em>false</em>}: |
| 1312 | If true, pretend the operation completed successfully, |
| 1313 | but don’t actually change any repository data. For most |
| 1314 | helpers this only applies to the <em>push</em>, if supported.</p></div> |
| 1315 | <div class="dlist"><dl> |
| 1316 | <dt class="hdlist1"> |
| 1317 | <em>option servpath <c-style-quoted-path></em> |
| 1318 | </dt> |
| 1319 | <dd> |
| 1320 | <p> |
| 1321 | Sets service path (--upload-pack, --receive-pack etc.) for |
| 1322 | next connect. Remote helper may support this option, but |
| 1323 | must not rely on this option being set before |
| 1324 | connect request occurs. |
| 1325 | </p> |
| 1326 | </dd> |
Junio C Hamano | 8eac268 | 2013-09-09 22:35:20 | [diff] [blame] | 1327 | <dt class="hdlist1"> |
| 1328 | <em>option check-connectivity</em> {<em>true</em>|<em>false</em>} |
| 1329 | </dt> |
| 1330 | <dd> |
| 1331 | <p> |
| 1332 | Request the helper to check connectivity of a clone. |
| 1333 | </p> |
| 1334 | </dd> |
Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame] | 1335 | <dt class="hdlist1"> |
Junio C Hamano | 3b0cdc2 | 2014-03-18 22:06:16 | [diff] [blame] | 1336 | <em>option force</em> {<em>true</em>|<em>false</em>} |
| 1337 | </dt> |
| 1338 | <dd> |
| 1339 | <p> |
| 1340 | Request the helper to perform a force update. Defaults to |
| 1341 | <em>false</em>. |
| 1342 | </p> |
| 1343 | </dd> |
| 1344 | <dt class="hdlist1"> |
Junio C Hamano | e89102f | 2017-02-15 23:18:15 | [diff] [blame] | 1345 | <em>option cloning</em> {<em>true</em>|<em>false</em>} |
Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame] | 1346 | </dt> |
| 1347 | <dd> |
| 1348 | <p> |
| 1349 | Notify the helper this is a clone request (i.e. the current |
| 1350 | repository is guaranteed empty). |
| 1351 | </p> |
| 1352 | </dd> |
| 1353 | <dt class="hdlist1"> |
Junio C Hamano | e89102f | 2017-02-15 23:18:15 | [diff] [blame] | 1354 | <em>option update-shallow</em> {<em>true</em>|<em>false</em>} |
Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame] | 1355 | </dt> |
| 1356 | <dd> |
| 1357 | <p> |
| 1358 | Allow to extend .git/shallow if the new refs require it. |
| 1359 | </p> |
| 1360 | </dd> |
Junio C Hamano | 3891e25 | 2015-08-31 23:06:13 | [diff] [blame] | 1361 | <dt class="hdlist1"> |
Junio C Hamano | e89102f | 2017-02-15 23:18:15 | [diff] [blame] | 1362 | <em>option pushcert</em> {<em>true</em>|<em>false</em>} |
Junio C Hamano | 3891e25 | 2015-08-31 23:06:13 | [diff] [blame] | 1363 | </dt> |
| 1364 | <dd> |
| 1365 | <p> |
| 1366 | GPG sign pushes. |
| 1367 | </p> |
| 1368 | </dd> |
Junio C Hamano | e89102f | 2017-02-15 23:18:15 | [diff] [blame] | 1369 | <dt class="hdlist1"> |
| 1370 | 'option push-option <string> |
| 1371 | </dt> |
| 1372 | <dd> |
| 1373 | <p> |
Junio C Hamano | 4c60d9a | 2017-05-04 14:36:22 | [diff] [blame] | 1374 | Transmit <string> as a push option. As the push option |
Junio C Hamano | e89102f | 2017-02-15 23:18:15 | [diff] [blame] | 1375 | must not contain LF or NUL characters, the string is not encoded. |
| 1376 | </p> |
| 1377 | </dd> |
Junio C Hamano | 640779d | 2018-02-14 01:29:14 | [diff] [blame] | 1378 | <dt class="hdlist1"> |
| 1379 | <em>option from-promisor</em> {<em>true</em>|<em>false</em>} |
| 1380 | </dt> |
| 1381 | <dd> |
| 1382 | <p> |
| 1383 | Indicate that these objects are being fetched from a promisor. |
| 1384 | </p> |
| 1385 | </dd> |
| 1386 | <dt class="hdlist1"> |
| 1387 | <em>option no-dependents</em> {<em>true</em>|<em>false</em>} |
| 1388 | </dt> |
| 1389 | <dd> |
| 1390 | <p> |
| 1391 | Indicate that only the objects wanted need to be fetched, not |
| 1392 | their dependents. |
| 1393 | </p> |
| 1394 | </dd> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1395 | </dl></div> |
| 1396 | </div> |
| 1397 | </div> |
| 1398 | <div class="sect1"> |
| 1399 | <h2 id="_see_also">SEE ALSO</h2> |
| 1400 | <div class="sectionbody"> |
| 1401 | <div class="paragraph"><p><a href="git-remote.html">git-remote(1)</a></p></div> |
Junio C Hamano | 1322024 | 2014-11-19 23:06:27 | [diff] [blame] | 1402 | <div class="paragraph"><p><a href="git-remote-ext.html">git-remote-ext(1)</a></p></div> |
| 1403 | <div class="paragraph"><p><a href="git-remote-fd.html">git-remote-fd(1)</a></p></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1404 | <div class="paragraph"><p><a href="git-remote-testgit.html">git-remote-testgit(1)</a></p></div> |
Junio C Hamano | 1322024 | 2014-11-19 23:06:27 | [diff] [blame] | 1405 | <div class="paragraph"><p><a href="git-fast-import.html">git-fast-import(1)</a></p></div> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1406 | </div> |
| 1407 | </div> |
| 1408 | <div class="sect1"> |
| 1409 | <h2 id="_git">GIT</h2> |
| 1410 | <div class="sectionbody"> |
| 1411 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
| 1412 | </div> |
| 1413 | </div> |
| 1414 | </div> |
| 1415 | <div id="footnotes"><hr /></div> |
| 1416 | <div id="footer"> |
| 1417 | <div id="footer-text"> |
Junio C Hamano | 2ef0ba3 | 2018-01-26 23:13:53 | [diff] [blame] | 1418 | Last updated |
Junio C Hamano | 640779d | 2018-02-14 01:29:14 | [diff] [blame] | 1419 | 2018-02-13 17:28:38 PST |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1420 | </div> |
| 1421 | </div> |
| 1422 | </body> |
| 1423 | </html> |