1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
6 <meta http-equiv=
"Content-Type" content=
"application/xhtml+xml; charset=UTF-8" />
7 <meta name=
"generator" content=
"AsciiDoc 10.2.0" />
8 <title>gitremote-helpers(
7)
</title>
9 <style type=
"text/css">
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
14 font-family: Georgia,serif;
18 h1, h2, h3, h4, h5, h6,
19 div.title, caption.title,
20 thead, p.table.header,
22 #author, #revnumber, #revdate, #revremark,
24 font-family: Arial,Helvetica,sans-serif;
28 margin:
1em
5%
1em
5%;
33 text-decoration: underline;
49 h1, h2, h3, h4, h5, h6 {
57 border-bottom:
2px solid silver;
77 border:
1px solid silver;
88 ul
> li { color: #aaa; }
89 ul
> li
> * { color: black; }
91 .monospaced, code, pre {
92 font-family:
"Courier New", Courier, monospace;
99 white-space: pre-wrap;
109 #revnumber, #revdate, #revremark {
114 border-top:
2px solid silver;
120 padding-bottom:
0.5em;
124 padding-bottom:
0.5em;
129 margin-bottom:
1.5em;
131 div.imageblock, div.exampleblock, div.verseblock,
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133 div.admonitionblock {
135 margin-bottom:
1.5em;
137 div.admonitionblock {
139 margin-bottom:
2.0em;
144 div.content { /* Block element content. */
148 /* Block element titles. */
149 div.title, caption.title {
154 margin-bottom:
0.5em;
160 td div.title:first-child {
163 div.content div.title:first-child {
166 div.content + div.title {
170 div.sidebarblock
> div.content {
172 border:
1px solid #dddddd;
173 border-left:
4px solid #f0f0f0;
177 div.listingblock
> div.content {
178 border:
1px solid #dddddd;
179 border-left:
5px solid #f0f0f0;
184 div.quoteblock, div.verseblock {
188 border-left:
5px solid #f0f0f0;
192 div.quoteblock
> div.attribution {
197 div.verseblock
> pre.content {
198 font-family: inherit;
201 div.verseblock
> div.attribution {
205 /* DEPRECATED: Pre version
8.2.7 verse style literal block. */
206 div.verseblock + div.attribution {
210 div.admonitionblock .icon {
214 text-decoration: underline;
216 padding-right:
0.5em;
218 div.admonitionblock td.content {
220 border-left:
3px solid #dddddd;
223 div.exampleblock
> div.content {
224 border-left:
3px solid #dddddd;
228 div.imageblock div.content { padding-left:
0; }
229 span.image img { border-style: none; vertical-align: text-bottom; }
230 a.image:visited { color: white; }
234 margin-bottom:
0.8em;
247 list-style-position: outside;
250 list-style-type: decimal;
253 list-style-type: lower-alpha;
256 list-style-type: upper-alpha;
259 list-style-type: lower-roman;
262 list-style-type: upper-roman;
265 div.compact ul, div.compact ol,
266 div.compact p, div.compact p,
267 div.compact div, div.compact div {
269 margin-bottom:
0.1em;
281 margin-bottom:
0.8em;
284 padding-bottom:
15px;
286 dt.hdlist1.strong, td.hdlist1.strong {
292 padding-right:
0.8em;
298 div.hdlist.compact tr {
307 .footnote, .footnoteref {
311 span.footnote, span.footnoteref {
312 vertical-align: super;
316 margin:
20px
0 20px
0;
320 #footnotes div.footnote {
326 border-top:
1px solid silver;
335 padding-right:
0.5em;
336 padding-bottom:
0.3em;
344 #footer-badges { display: none; }
348 margin-bottom:
2.5em;
356 margin-bottom:
0.1em;
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
376 span.aqua { color: aqua; }
377 span.black { color: black; }
378 span.blue { color: blue; }
379 span.fuchsia { color: fuchsia; }
380 span.gray { color: gray; }
381 span.green { color: green; }
382 span.lime { color: lime; }
383 span.maroon { color: maroon; }
384 span.navy { color: navy; }
385 span.olive { color: olive; }
386 span.purple { color: purple; }
387 span.red { color: red; }
388 span.silver { color: silver; }
389 span.teal { color: teal; }
390 span.white { color: white; }
391 span.yellow { color: yellow; }
393 span.aqua-background { background: aqua; }
394 span.black-background { background: black; }
395 span.blue-background { background: blue; }
396 span.fuchsia-background { background: fuchsia; }
397 span.gray-background { background: gray; }
398 span.green-background { background: green; }
399 span.lime-background { background: lime; }
400 span.maroon-background { background: maroon; }
401 span.navy-background { background: navy; }
402 span.olive-background { background: olive; }
403 span.purple-background { background: purple; }
404 span.red-background { background: red; }
405 span.silver-background { background: silver; }
406 span.teal-background { background: teal; }
407 span.white-background { background: white; }
408 span.yellow-background { background: yellow; }
410 span.big { font-size:
2em; }
411 span.small { font-size:
0.6em; }
413 span.underline { text-decoration: underline; }
414 span.overline { text-decoration: overline; }
415 span.line-through { text-decoration: line-through; }
417 div.unbreakable { page-break-inside: avoid; }
427 margin-bottom:
1.5em;
429 div.tableblock
> table {
430 border:
3px solid #
527bbd;
432 thead, p.table.header {
439 /* Because the table frame attribute is overridden by CSS in most browsers. */
440 div.tableblock
> table[
frame=
"void"] {
443 div.tableblock
> table[
frame=
"hsides"] {
444 border-left-style: none;
445 border-right-style: none;
447 div.tableblock
> table[
frame=
"vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
460 margin-bottom:
1.5em;
462 thead, p.tableblock.header {
473 border-color: #
527bbd;
474 border-collapse: collapse;
476 th.tableblock, td.tableblock {
480 border-color: #
527bbd;
483 table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
487 table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
491 table.tableblock.frame-none {
492 border-style: hidden;
495 th.tableblock.halign-left, td.tableblock.halign-left {
498 th.tableblock.halign-center, td.tableblock.halign-center {
501 th.tableblock.halign-right, td.tableblock.halign-right {
505 th.tableblock.valign-top, td.tableblock.valign-top {
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
523 padding-bottom:
0.5em;
524 border-top:
2px solid silver;
525 border-bottom:
2px solid silver;
530 body.manpage div.sectionbody {
535 body.manpage div#toc { display: none; }
540 <script type=
"text/javascript">
542 var asciidoc = { // Namespace.
544 /////////////////////////////////////////////////////////////////////
545 // Table Of Contents generator
546 /////////////////////////////////////////////////////////////////////
548 /* Author: Mihai Bazon, September
2002
549 * http://students.infoiasi.ro/~mishoo
551 * Table Of Content generator
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
558 /* modified by Troy D. Hanson, September
2006. License: GPL */
559 /* modified by Stuart Rackham,
2006,
2009. License: GPL */
562 toc: function (toclevels) {
564 function getText(el) {
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType ==
3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
569 else if (i.firstChild != null)
575 function TocEntry(el, text, toclevel) {
578 this.toclevel = toclevel;
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([
1-'+(toclevels+
1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType ==
1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute(
"class") || i.getAttribute(
"className")) !=
"float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[
1]-
1);
602 var toc = document.getElementById(
"toc");
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
610 for (i =
0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute(
"class")
614 && entry.getAttribute(
"class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
617 for (i =
0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById(
"content"), toclevels);
623 for (var i =
0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id ==
"")
626 entry.element.id =
"_toc_" + i;
627 var a = document.createElement(
"a");
628 a.href =
"#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement(
"div");
632 div.className =
"toclevel" + entry.toclevel;
633 toc.appendChild(div);
635 if (entries.length ==
0)
636 toc.parentNode.removeChild(toc);
640 /////////////////////////////////////////////////////////////////////
641 // Footnotes generator
642 /////////////////////////////////////////////////////////////////////
644 /* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/
2005/
07/format_footnote.html
648 footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
651 var noteholder = document.getElementById(
"footnotes");
655 var entriesToRemove = [];
656 for (i =
0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute(
"class") ==
"footnote")
659 entriesToRemove.push(entry);
661 for (i =
0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
665 // Rebuild footnote entries.
666 var cont = document.getElementById(
"content");
667 var spans = cont.getElementsByTagName(
"span");
670 for (i=
0; i
<spans.length; i++) {
671 if (spans[i].className ==
"footnote") {
673 var note = spans[i].getAttribute(
"data-note");
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[
1];
679 "[<a id='_footnoteref_" + n +
"' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n +
"</a>]";
681 spans[i].setAttribute(
"data-note", note);
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n +
"'>" +
685 "<a href='#_footnoteref_" + n +
"' title='Return to text'>" +
686 n +
"</a>. " + note +
"</div>";
687 var id =spans[i].getAttribute(
"id");
688 if (id != null) refs[
"#"+id] = n;
692 noteholder.parentNode.removeChild(noteholder);
694 // Process footnoterefs.
695 for (i=
0; i
<spans.length; i++) {
696 if (spans[i].className ==
"footnoteref") {
697 var href = spans[i].getElementsByTagName(
"a")[
0].getAttribute(
"href");
698 href = href.match(/#.*/)[
0]; // Because IE return full URL.
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n +
"</a>]";
708 install: function(toclevels) {
711 function reinstall() {
712 asciidoc.footnotes();
714 asciidoc.toc(toclevels);
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
723 timerId = setInterval(reinstall,
500);
724 if (document.addEventListener)
725 document.addEventListener(
"DOMContentLoaded", reinstallAndRemoveTimer, false);
727 window.onload = reinstallAndRemoveTimer;
735 <body class=
"manpage">
738 gitremote-helpers(
7) Manual Page
741 <div class=
"sectionbody">
742 <p>gitremote-helpers -
743 Helper programs to interact with remote repositories
749 <h2 id=
"_synopsis">SYNOPSIS
</h2>
750 <div class=
"sectionbody">
751 <div class=
"verseblock">
752 <pre class=
"content"><em>git remote-
<transport
></em> <repository
> [
<URL
>]
</pre>
753 <div class=
"attribution">
758 <h2 id=
"_description">DESCRIPTION
</h2>
759 <div class=
"sectionbody">
760 <div class=
"paragraph"><p>Remote helper programs are normally not used directly by end users,
761 but they are invoked by Git when it needs to interact with remote
762 repositories Git does not support natively. A given helper will
763 implement a subset of the capabilities documented here. When Git
764 needs to interact with a repository using a remote helper, it spawns
765 the helper as an independent process, sends commands to the helper
’s
766 standard input, and expects results from the helper
’s standard
767 output. Because a remote helper runs as an independent process from
768 Git, there is no need to re-link Git to add a new helper, nor any
769 need to link the helper with the implementation of Git.
</p></div>
770 <div class=
"paragraph"><p>Every helper must support the
"capabilities" command, which Git
771 uses to determine what other commands the helper will accept. Those
772 other commands can be used to discover and update remote refs,
773 transport objects between the object database and the remote repository,
774 and update the local object store.
</p></div>
775 <div class=
"paragraph"><p>Git comes with a
"curl" family of remote helpers, that handle various
776 transport protocols, such as
<em>git-remote-http
</em>,
<em>git-remote-https
</em>,
777 <em>git-remote-ftp
</em> and
<em>git-remote-ftps
</em>. They implement the capabilities
778 <em>fetch
</em>,
<em>option
</em>, and
<em>push
</em>.
</p></div>
782 <h2 id=
"_invocation">INVOCATION
</h2>
783 <div class=
"sectionbody">
784 <div class=
"paragraph"><p>Remote helper programs are invoked with one or (optionally) two
785 arguments. The first argument specifies a remote repository as in Git;
786 it is either the name of a configured remote or a URL. The second
787 argument specifies a URL; it is usually of the form
788 <em><transport
>://
<address
></em>, but any arbitrary string is possible.
789 The
<code>GIT_DIR
</code> environment variable is set up for the remote helper
790 and can be used to determine where to store additional data or from
791 which directory to invoke auxiliary Git commands.
</p></div>
792 <div class=
"paragraph"><p>When Git encounters a URL of the form
<em><transport
>://
<address
></em>, where
793 <em><transport
></em> is a protocol that it cannot handle natively, it
794 automatically invokes
<em>git remote-
<transport
></em> with the full URL as
795 the second argument. If such a URL is encountered directly on the
796 command line, the first argument is the same as the second, and if it
797 is encountered in a configured remote, the first argument is the name
798 of that remote.
</p></div>
799 <div class=
"paragraph"><p>A URL of the form
<em><transport
>::
<address
></em> explicitly instructs Git to
800 invoke
<em>git remote-
<transport
></em> with
<em><address
></em> as the second
801 argument. If such a URL is encountered directly on the command line,
802 the first argument is
<em><address
></em>, and if it is encountered in a
803 configured remote, the first argument is the name of that remote.
</p></div>
804 <div class=
"paragraph"><p>Additionally, when a configured remote has
<code>remote.
<name
>.vcs
</code> set to
805 <em><transport
></em>, Git explicitly invokes
<em>git remote-
<transport
></em> with
806 <em><name
></em> as the first argument. If set, the second argument is
807 <code>remote.
<name
>.url
</code>; otherwise, the second argument is omitted.
</p></div>
811 <h2 id=
"_input_format">INPUT FORMAT
</h2>
812 <div class=
"sectionbody">
813 <div class=
"paragraph"><p>Git sends the remote helper a list of commands on standard input, one
814 per line. The first command is always the
<em>capabilities
</em> command, in
815 response to which the remote helper must print a list of the
816 capabilities it supports (see below) followed by a blank line. The
817 response to the capabilities command determines what commands Git uses
818 in the remainder of the command stream.
</p></div>
819 <div class=
"paragraph"><p>The command stream is terminated by a blank line. In some cases
820 (indicated in the documentation of the relevant commands), this blank
821 line is followed by a payload in some other protocol (e.g., the pack
822 protocol), while in others it indicates the end of input.
</p></div>
824 <h3 id=
"_capabilities">Capabilities
</h3>
825 <div class=
"paragraph"><p>Each remote helper is expected to support only a subset of commands.
826 The operations a helper supports are declared to Git in the response
827 to the
<code>capabilities
</code> command (see COMMANDS, below).
</p></div>
828 <div class=
"paragraph"><p>In the following, we list all defined capabilities and for
829 each we list which commands a helper with that capability
830 must provide.
</p></div>
832 <h4 id=
"_capabilities_for_pushing">Capabilities for Pushing
</h4>
833 <div class=
"dlist"><dl>
839 Can attempt to connect to
<em>git receive-pack
</em> (for pushing),
840 <em>git upload-pack
</em>, etc for communication using
841 git
’s native packfile protocol. This
842 requires a bidirectional, full-duplex connection.
844 <div class=
"paragraph"><p>Supported commands:
<em>connect
</em>.
</p></div>
847 <em>stateless-connect
</em>
851 Experimental; for internal use only.
852 Can attempt to connect to a remote server for communication
853 using git
’s wire-protocol version
2. See the documentation
854 for the stateless-connect command for more information.
856 <div class=
"paragraph"><p>Supported commands:
<em>stateless-connect
</em>.
</p></div>
863 Can discover remote refs and push local commits and the
864 history leading up to them to new or existing remote refs.
866 <div class=
"paragraph"><p>Supported commands:
<em>list for-push
</em>,
<em>push
</em>.
</p></div>
873 Can discover remote refs and push specified objects from a
874 fast-import stream to remote refs.
876 <div class=
"paragraph"><p>Supported commands:
<em>list for-push
</em>,
<em>export
</em>.
</p></div>
879 <div class=
"paragraph"><p>If a helper advertises
<em>connect
</em>, Git will use it if possible and
880 fall back to another capability if the helper requests so when
881 connecting (see the
<em>connect
</em> command under COMMANDS).
882 When choosing between
<em>push
</em> and
<em>export
</em>, Git prefers
<em>push
</em>.
883 Other frontends may have some other order of preference.
</p></div>
884 <div class=
"dlist"><dl>
886 <em>no-private-update
</em>
890 When using the
<em>refspec
</em> capability, git normally updates the
891 private ref on successful push. This update is disabled when
892 the remote-helper declares the capability
<em>no-private-update
</em>.
898 <h4 id=
"_capabilities_for_fetching">Capabilities for Fetching
</h4>
899 <div class=
"dlist"><dl>
905 Can try to connect to
<em>git upload-pack
</em> (for fetching),
906 <em>git receive-pack
</em>, etc for communication using the
907 Git
’s native packfile protocol. This
908 requires a bidirectional, full-duplex connection.
910 <div class=
"paragraph"><p>Supported commands:
<em>connect
</em>.
</p></div>
913 <em>stateless-connect
</em>
917 Experimental; for internal use only.
918 Can attempt to connect to a remote server for communication
919 using git
’s wire-protocol version
2. See the documentation
920 for the stateless-connect command for more information.
922 <div class=
"paragraph"><p>Supported commands:
<em>stateless-connect
</em>.
</p></div>
929 Can discover remote refs and transfer objects reachable from
930 them to the local object store.
932 <div class=
"paragraph"><p>Supported commands:
<em>list
</em>,
<em>fetch
</em>.
</p></div>
939 Can discover remote refs and output objects reachable from
940 them as a stream in fast-import format.
942 <div class=
"paragraph"><p>Supported commands:
<em>list
</em>,
<em>import
</em>.
</p></div>
945 <em>check-connectivity
</em>
949 Can guarantee that when a clone is requested, the received
950 pack is self contained and is connected.
958 Can use the
<em>get
</em> command to download a file from a given URI.
962 <div class=
"paragraph"><p>If a helper advertises
<em>connect
</em>, Git will use it if possible and
963 fall back to another capability if the helper requests so when
964 connecting (see the
<em>connect
</em> command under COMMANDS).
965 When choosing between
<em>fetch
</em> and
<em>import
</em>, Git prefers
<em>fetch
</em>.
966 Other frontends may have some other order of preference.
</p></div>
969 <h4 id=
"_miscellaneous_capabilities">Miscellaneous capabilities
</h4>
970 <div class=
"dlist"><dl>
976 For specifying settings like
<code>verbosity
</code> (how much output to
977 write to stderr) and
<code>depth
</code> (how much history is wanted in the
978 case of a shallow clone) that affect how other commands are
983 <em>refspec
</em> <refspec
>
987 For remote helpers that implement
<em>import
</em> or
<em>export
</em>, this capability
988 allows the refs to be constrained to a private namespace, instead of
989 writing to refs/heads or refs/remotes directly.
990 It is recommended that all importers providing the
<em>import
</em>
991 capability use this. It
’s mandatory for
<em>export
</em>.
993 <div class=
"paragraph"><p>A helper advertising the capability
994 <code>refspec refs/heads/*:refs/svn/origin/branches/*
</code>
995 is saying that, when it is asked to
<code>import refs/heads/topic
</code>, the
996 stream it outputs will update the
<code>refs/svn/origin/branches/topic
</code>
998 <div class=
"paragraph"><p>This capability can be advertised multiple times. The first
999 applicable refspec takes precedence. The left-hand of refspecs
1000 advertised with this capability must cover all refs reported by
1001 the list command. If no
<em>refspec
</em> capability is advertised,
1002 there is an implied
<code>refspec *:*
</code>.
</p></div>
1003 <div class=
"paragraph"><p>When writing remote-helpers for decentralized version control
1004 systems, it is advised to keep a local copy of the repository to
1005 interact with, and to let the private namespace refs point to this
1006 local repository, while the refs/remotes namespace is used to track
1007 the remote repository.
</p></div>
1009 <dt class=
"hdlist1">
1010 <em>bidi-import
</em>
1014 This modifies the
<em>import
</em> capability.
1015 The fast-import commands
<em>cat-blob
</em> and
<em>ls
</em> can be used by remote-helpers
1016 to retrieve information about blobs and trees that already exist in
1017 fast-import
’s memory. This requires a channel from fast-import to the
1019 If it is advertised in addition to
"import", Git establishes a pipe from
1020 fast-import to the remote-helper
’s stdin.
1021 It follows that Git and fast-import are both connected to the
1022 remote-helper
’s stdin. Because Git can send multiple commands to
1023 the remote-helper it is required that helpers that use
<em>bidi-import
</em>
1024 buffer all
<em>import
</em> commands of a batch before sending data to fast-import.
1025 This is to prevent mixing commands and fast-import responses on the
1026 helper
’s stdin.
1029 <dt class=
"hdlist1">
1030 <em>export-marks
</em> <file
>
1034 This modifies the
<em>export
</em> capability, instructing Git to dump the
1035 internal marks table to
<file
> when complete. For details,
1036 read up on
<code>--export-marks=
<file
></code> in
<a href=
"git-fast-export.html">git-fast-export(
1)
</a>.
1039 <dt class=
"hdlist1">
1040 <em>import-marks
</em> <file
>
1044 This modifies the
<em>export
</em> capability, instructing Git to load the
1045 marks specified in
<file
> before processing any input. For details,
1046 read up on
<code>--import-marks=
<file
></code> in
<a href=
"git-fast-export.html">git-fast-export(
1)
</a>.
1049 <dt class=
"hdlist1">
1050 <em>signed-tags
</em>
1054 This modifies the
<em>export
</em> capability, instructing Git to pass
1055 <code>--signed-tags=verbatim
</code> to
<a href=
"git-fast-export.html">git-fast-export(
1)
</a>. In the
1056 absence of this capability, Git will use
<code>--signed-tags=warn-strip
</code>.
1059 <dt class=
"hdlist1">
1060 <em>object-format
</em>
1064 This indicates that the helper is able to interact with the remote
1065 side using an explicit hash algorithm extension.
1074 <h2 id=
"_commands">COMMANDS
</h2>
1075 <div class=
"sectionbody">
1076 <div class=
"paragraph"><p>Commands are given by the caller on the helper
’s standard input, one per line.
</p></div>
1077 <div class=
"dlist"><dl>
1078 <dt class=
"hdlist1">
1079 <em>capabilities
</em>
1083 Lists the capabilities of the helper, one per line, ending
1084 with a blank line. Each capability may be preceded with
<em>*
</em>,
1085 which marks them mandatory for Git versions using the remote
1086 helper to understand. Any unknown mandatory capability is a
1089 <div class=
"paragraph"><p>Support for this command is mandatory.
</p></div>
1091 <dt class=
"hdlist1">
1096 Lists the refs, one per line, in the format
"<value> <name>
1097 [<attr> …]". The value may be a hex sha1 hash,
"@<dest>" for
1098 a symref,
":<keyword> <value>" for a key-value pair, or
1099 "?" to indicate that the helper could not get the value of the
1100 ref. A space-separated list of attributes follows the name;
1101 unrecognized attributes are ignored. The list ends with a
1104 <div class=
"paragraph"><p>See REF LIST ATTRIBUTES for a list of currently defined attributes.
1105 See REF LIST KEYWORDS for a list of currently defined keywords.
</p></div>
1106 <div class=
"paragraph"><p>Supported if the helper has the
"fetch" or
"import" capability.
</p></div>
1108 <dt class=
"hdlist1">
1109 <em>list for-push
</em>
1113 Similar to
<em>list
</em>, except that it is used if and only if
1114 the caller wants to the resulting ref list to prepare
1116 A helper supporting both push and fetch can use this
1117 to distinguish for which operation the output of
<em>list
</em>
1118 is going to be used, possibly reducing the amount
1119 of work that needs to be performed.
1121 <div class=
"paragraph"><p>Supported if the helper has the
"push" or
"export" capability.
</p></div>
1123 <dt class=
"hdlist1">
1124 <em>option
</em> <name
> <value
>
1128 Sets the transport helper option
<name
> to
<value
>. Outputs a
1129 single line containing one of
<em>ok
</em> (option successfully set),
1130 <em>unsupported
</em> (option not recognized) or
<em>error
<msg
></em>
1131 (option
<name
> is supported but
<value
> is not valid
1132 for it). Options should be set before other commands,
1133 and may influence the behavior of those commands.
1135 <div class=
"paragraph"><p>See OPTIONS for a list of currently defined options.
</p></div>
1136 <div class=
"paragraph"><p>Supported if the helper has the
"option" capability.
</p></div>
1138 <dt class=
"hdlist1">
1139 <em>fetch
</em> <sha1
> <name
>
1143 Fetches the given object, writing the necessary objects
1144 to the database. Fetch commands are sent in a batch, one
1145 per line, terminated with a blank line.
1146 Outputs a single blank line when all fetch commands in the
1147 same batch are complete. Only objects which were reported
1148 in the output of
<em>list
</em> with a sha1 may be fetched this way.
1150 <div class=
"paragraph"><p>Optionally may output a
<em>lock
<file
></em> line indicating the full path of
1151 a file under
<code>$GIT_DIR/objects/pack
</code> which is keeping a pack until
1152 refs can be suitably updated. The path must end with
<code>.keep
</code>. This is
1153 a mechanism to name a
<pack,idx,keep
> tuple by giving only the keep
1154 component. The kept pack will not be deleted by a concurrent repack,
1155 even though its objects may not be referenced until the fetch completes.
1156 The
<code>.keep
</code> file will be deleted at the conclusion of the fetch.
</p></div>
1157 <div class=
"paragraph"><p>If option
<em>check-connectivity
</em> is requested, the helper must output
1158 <em>connectivity-ok
</em> if the clone is self-contained and connected.
</p></div>
1159 <div class=
"paragraph"><p>Supported if the helper has the
"fetch" capability.
</p></div>
1161 <dt class=
"hdlist1">
1162 <em>push
</em> +
<src
>:
<dst
>
1166 Pushes the given local
<src
> commit or branch to the
1167 remote branch described by
<dst
>. A batch sequence of
1168 one or more
<em>push
</em> commands is terminated with a blank line
1169 (if there is only one reference to push, a single
<em>push
</em> command
1170 is followed by a blank line). For example, the following would
1171 be two batches of
<em>push
</em>, the first asking the remote-helper
1172 to push the local ref
<em>master
</em> to the remote ref
<em>master
</em> and
1173 the local
<code>HEAD
</code> to the remote
<em>branch
</em>, and the second
1174 asking to push ref
<em>foo
</em> to ref
<em>bar
</em> (forced update requested
1177 <div class=
"listingblock">
1178 <div class=
"content">
1179 <pre><code>push refs/heads/master:refs/heads/master
1180 push HEAD:refs/heads/branch
1182 push +refs/heads/foo:refs/heads/bar
1185 <div class=
"paragraph"><p>Zero or more protocol options may be entered after the last
<em>push
</em>
1186 command, before the batch
’s terminating blank line.
</p></div>
1187 <div class=
"paragraph"><p>When the push is complete, outputs one or more
<em>ok
<dst
></em> or
1188 <em>error
<dst
> <why
>?
</em> lines to indicate success or failure of
1189 each pushed ref. The status report output is terminated by
1190 a blank line. The option field
<why
> may be quoted in a C
1191 style string if it contains an LF.
</p></div>
1192 <div class=
"paragraph"><p>Supported if the helper has the
"push" capability.
</p></div>
1194 <dt class=
"hdlist1">
1195 <em>import
</em> <name
>
1199 Produces a fast-import stream which imports the current value
1200 of the named ref. It may additionally import other refs as
1201 needed to construct the history efficiently. The script writes
1202 to a helper-specific private namespace. The value of the named
1203 ref should be written to a location in this namespace derived
1204 by applying the refspecs from the
"refspec" capability to the
1207 <div class=
"paragraph"><p>Especially useful for interoperability with a foreign versioning
1209 <div class=
"paragraph"><p>Just like
<em>push
</em>, a batch sequence of one or more
<em>import
</em> is
1210 terminated with a blank line. For each batch of
<em>import
</em>, the remote
1211 helper should produce a fast-import stream terminated by a
<em>done
</em>
1213 <div class=
"paragraph"><p>Note that if the
<em>bidi-import
</em> capability is used the complete batch
1214 sequence has to be buffered before starting to send data to fast-import
1215 to prevent mixing of commands and fast-import responses on the helper
’s
1217 <div class=
"paragraph"><p>Supported if the helper has the
"import" capability.
</p></div>
1219 <dt class=
"hdlist1">
1224 Instructs the remote helper that any subsequent input is
1225 part of a fast-import stream (generated by
<em>git fast-export
</em>)
1226 containing objects which should be pushed to the remote.
1228 <div class=
"paragraph"><p>Especially useful for interoperability with a foreign versioning
1230 <div class=
"paragraph"><p>The
<em>export-marks
</em> and
<em>import-marks
</em> capabilities, if specified,
1231 affect this command in so far as they are passed on to
<em>git
1232 fast-export
</em>, which then will load/store a table of marks for
1233 local objects. This can be used to implement for incremental
1234 operations.
</p></div>
1235 <div class=
"paragraph"><p>Supported if the helper has the
"export" capability.
</p></div>
1237 <dt class=
"hdlist1">
1238 <em>connect
</em> <service
>
1242 Connects to given service. Standard input and standard output
1243 of helper are connected to specified service (git prefix is
1244 included in service name so e.g. fetching uses
<em>git-upload-pack
</em>
1245 as service) on remote side. Valid replies to this command are
1246 empty line (connection established),
<em>fallback
</em> (no smart
1247 transport support, fall back to dumb transports) and just
1248 exiting with error message printed (can
’t connect, don
’t
1249 bother trying to fall back). After line feed terminating the
1250 positive (empty) response, the output of service starts. After
1251 the connection ends, the remote helper exits.
1253 <div class=
"paragraph"><p>Supported if the helper has the
"connect" capability.
</p></div>
1255 <dt class=
"hdlist1">
1256 <em>stateless-connect
</em> <service
>
1260 Experimental; for internal use only.
1261 Connects to the given remote service for communication using
1262 git
’s wire-protocol version
2. Valid replies to this command
1263 are empty line (connection established),
<em>fallback
</em> (no smart
1264 transport support, fall back to dumb transports) and just
1265 exiting with error message printed (can
’t connect, don
’t bother
1266 trying to fall back). After line feed terminating the positive
1267 (empty) response, the output of the service starts. Messages
1268 (both request and response) must consist of zero or more
1269 PKT-LINEs, terminating in a flush packet. Response messages will
1270 then have a response end packet after the flush packet to
1271 indicate the end of a response. The client must not
1272 expect the server to store any state in between request-response
1273 pairs. After the connection ends, the remote helper exits.
1275 <div class=
"paragraph"><p>Supported if the helper has the
"stateless-connect" capability.
</p></div>
1277 <dt class=
"hdlist1">
1278 <em>get
</em> <uri
> <path
>
1282 Downloads the file from the given
<code><uri
></code> to the given
<code><path
></code>. If
1283 <code><path
>.temp
</code> exists, then Git assumes that the
<code>.temp
</code> file is a
1284 partial download from a previous attempt and will resume the
1285 download from that position.
1289 <div class=
"paragraph"><p>If a fatal error occurs, the program writes the error message to
1290 stderr and exits. The caller should expect that a suitable error
1291 message has been printed if the child closes the connection without
1292 completing a valid response for the current command.
</p></div>
1293 <div class=
"paragraph"><p>Additional commands may be supported, as may be determined from
1294 capabilities reported by the helper.
</p></div>
1298 <h2 id=
"_ref_list_attributes">REF LIST ATTRIBUTES
</h2>
1299 <div class=
"sectionbody">
1300 <div class=
"paragraph"><p>The
<em>list
</em> command produces a list of refs in which each ref
1301 may be followed by a list of attributes. The following ref list
1302 attributes are defined.
</p></div>
1303 <div class=
"dlist"><dl>
1304 <dt class=
"hdlist1">
1309 This ref is unchanged since the last import or fetch, although
1310 the helper cannot necessarily determine what value that produced.
1317 <h2 id=
"_ref_list_keywords">REF LIST KEYWORDS
</h2>
1318 <div class=
"sectionbody">
1319 <div class=
"paragraph"><p>The
<em>list
</em> command may produce a list of key-value pairs.
1320 The following keys are defined.
</p></div>
1321 <div class=
"dlist"><dl>
1322 <dt class=
"hdlist1">
1323 <em>object-format
</em>
1327 The refs are using the given hash algorithm. This keyword is only
1328 used if the server and client both support the object-format
1336 <h2 id=
"_options">OPTIONS
</h2>
1337 <div class=
"sectionbody">
1338 <div class=
"paragraph"><p>The following options are defined and (under suitable circumstances)
1339 set by Git if the remote helper has the
<em>option
</em> capability.
</p></div>
1340 <div class=
"dlist"><dl>
1341 <dt class=
"hdlist1">
1342 <em>option verbosity
</em> <n
>
1346 Changes the verbosity of messages displayed by the helper.
1347 A value of
0 for
<n
> means that processes operate
1348 quietly, and the helper produces only error output.
1349 1 is the default level of verbosity, and higher values
1350 of
<n
> correspond to the number of -v flags passed on the
1354 <dt class=
"hdlist1">
1355 <em>option progress
</em> {
<em>true
</em>|
<em>false
</em>}
1359 Enables (or disables) progress messages displayed by the
1360 transport helper during a command.
1363 <dt class=
"hdlist1">
1364 <em>option depth
</em> <depth
>
1368 Deepens the history of a shallow repository.
1371 <dt class=
"hdlist1">
1372 'option deepen-since
<timestamp
>
1376 Deepens the history of a shallow repository based on time.
1379 <dt class=
"hdlist1">
1380 'option deepen-not
<ref
>
1384 Deepens the history of a shallow repository excluding ref.
1385 Multiple options add up.
1388 <dt class=
"hdlist1">
1389 <em>option deepen-relative {'true
</em>|
<em>false
</em>}
1393 Deepens the history of a shallow repository relative to
1394 current boundary. Only valid when used with
"option depth".
1397 <dt class=
"hdlist1">
1398 <em>option followtags
</em> {
<em>true
</em>|
<em>false
</em>}
1402 If enabled the helper should automatically fetch annotated
1403 tag objects if the object the tag points at was transferred
1404 during the fetch command. If the tag is not fetched by
1405 the helper a second fetch command will usually be sent to
1406 ask for the tag specifically. Some helpers may be able to
1407 use this option to avoid a second network connection.
1411 <div class=
"paragraph"><p><em>option dry-run
</em> {
<em>true
</em>|
<em>false
</em>}:
1412 If true, pretend the operation completed successfully,
1413 but don
’t actually change any repository data. For most
1414 helpers this only applies to the
<em>push
</em>, if supported.
</p></div>
1415 <div class=
"dlist"><dl>
1416 <dt class=
"hdlist1">
1417 <em>option servpath
<c-style-quoted-path
></em>
1421 Sets service path (--upload-pack, --receive-pack etc.) for
1422 next connect. Remote helper may support this option, but
1423 must not rely on this option being set before
1424 connect request occurs.
1427 <dt class=
"hdlist1">
1428 <em>option check-connectivity
</em> {
<em>true
</em>|
<em>false
</em>}
1432 Request the helper to check connectivity of a clone.
1435 <dt class=
"hdlist1">
1436 <em>option force
</em> {
<em>true
</em>|
<em>false
</em>}
1440 Request the helper to perform a force update. Defaults to
1444 <dt class=
"hdlist1">
1445 <em>option cloning
</em> {
<em>true
</em>|
<em>false
</em>}
1449 Notify the helper this is a clone request (i.e. the current
1450 repository is guaranteed empty).
1453 <dt class=
"hdlist1">
1454 <em>option update-shallow
</em> {
<em>true
</em>|
<em>false
</em>}
1458 Allow to extend .git/shallow if the new refs require it.
1461 <dt class=
"hdlist1">
1462 <em>option pushcert
</em> {
<em>true
</em>|
<em>false
</em>}
1469 <dt class=
"hdlist1">
1470 'option push-option
<string
>
1474 Transmit
<string
> as a push option. As the push option
1475 must not contain LF or NUL characters, the string is not encoded.
1478 <dt class=
"hdlist1">
1479 <em>option from-promisor
</em> {
<em>true
</em>|
<em>false
</em>}
1483 Indicate that these objects are being fetched from a promisor.
1486 <dt class=
"hdlist1">
1487 <em>option no-dependents
</em> {
<em>true
</em>|
<em>false
</em>}
1491 Indicate that only the objects wanted need to be fetched, not
1495 <dt class=
"hdlist1">
1496 <em>option atomic
</em> {
<em>true
</em>|
<em>false
</em>}
1500 When pushing, request the remote server to update refs in a single atomic
1501 transaction. If successful, all refs will be updated, or none will. If the
1502 remote side does not support this capability, the push will fail.
1505 <dt class=
"hdlist1">
1506 <em>option object-format
</em> {
<em>true
</em>|algorithm}
1510 If
<em>true
</em>, indicate that the caller wants hash algorithm information
1511 to be passed back from the remote. This mode is used when fetching
1514 <div class=
"paragraph"><p>If set to an algorithm, indicate that the caller wants to interact with
1515 the remote side using that algorithm.
</p></div>
1521 <h2 id=
"_see_also">SEE ALSO
</h2>
1522 <div class=
"sectionbody">
1523 <div class=
"paragraph"><p><a href=
"git-remote.html">git-remote(
1)
</a></p></div>
1524 <div class=
"paragraph"><p><a href=
"git-remote-ext.html">git-remote-ext(
1)
</a></p></div>
1525 <div class=
"paragraph"><p><a href=
"git-remote-fd.html">git-remote-fd(
1)
</a></p></div>
1526 <div class=
"paragraph"><p><a href=
"git-fast-import.html">git-fast-import(
1)
</a></p></div>
1530 <h2 id=
"_git">GIT
</h2>
1531 <div class=
"sectionbody">
1532 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
1536 <div id=
"footnotes"><hr /></div>
1538 <div id=
"footer-text">
1540 2022-
09-
01 13:
55:
22 PDT