Skip to content

Commit 271bfd6

Browse files
flyingflogitster
authored andcommitted
Add documentation for the 'bidi-import' capability of remote-helpers
Signed-off-by: Florian Achleitner <[email protected]> Acked-by: David Michael Barr <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bfc366d commit 271bfd6

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Documentation/git-remote-helpers.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ advertised with this capability must cover all refs reported by
9898
the list command. If no 'refspec' capability is advertised,
9999
there is an implied `refspec *:*`.
100100

101+
'bidi-import'::
102+
The fast-import commands 'cat-blob' and 'ls' can be used by remote-helpers
103+
to retrieve information about blobs and trees that already exist in
104+
fast-import's memory. This requires a channel from fast-import to the
105+
remote-helper.
106+
If it is advertised in addition to "import", git establishes a pipe from
107+
fast-import to the remote-helper's stdin.
108+
It follows that git and fast-import are both connected to the
109+
remote-helper's stdin. Because git can send multiple commands to
110+
the remote-helper it is required that helpers that use 'bidi-import'
111+
buffer all 'import' commands of a batch before sending data to fast-import.
112+
This is to prevent mixing commands and fast-import responses on the
113+
helper's stdin.
114+
101115
Capabilities for Pushing
102116
~~~~~~~~~~~~~~~~~~~~~~~~
103117
'connect'::
@@ -286,7 +300,12 @@ terminated with a blank line. For each batch of 'import', the remote
286300
helper should produce a fast-import stream terminated by a 'done'
287301
command.
288302
+
289-
Supported if the helper has the "import" capability.
303+
Note that if the 'bidi-import' capability is used the complete batch
304+
sequence has to be buffered before starting to send data to fast-import
305+
to prevent mixing of commands and fast-import responses on the helper's
306+
stdin.
307+
+
308+
Supported if the helper has the 'import' capability.
290309

291310
'connect' <service>::
292311
Connects to given service. Standard input and standard output

0 commit comments

Comments
 (0)