[PATCH v5 06/16] Add documentation for the 'bidi-import' capability of remote-helpers

2012-08-20 Thread Florian Achleitner
Signed-off-by: Florian Achleitner florian.achleitner.2.6...@gmail.com
Signed-off-by: Junio C Hamano gits...@pobox.com
---
 Documentation/git-remote-helpers.txt |   21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-remote-helpers.txt 
b/Documentation/git-remote-helpers.txt
index f5836e4..5faa48e 100644
--- a/Documentation/git-remote-helpers.txt
+++ b/Documentation/git-remote-helpers.txt
@@ -98,6 +98,20 @@ advertised with this capability must cover all refs reported 
by
 the list command.  If no 'refspec' capability is advertised,
 there is an implied `refspec *:*`.
 
+'bidi-import'::
+   The fast-import commands 'cat-blob' and 'ls' can be used by 
remote-helpers
+to retrieve information about blobs and trees that already exist in
+fast-import's memory. This requires a channel from fast-import to the
+remote-helper.
+If it is advertised in addition to import, git establishes a pipe from
+   fast-import to the remote-helper's stdin.
+   It follows that git and fast-import are both connected to the
+   remote-helper's stdin. Because git can send multiple commands to
+   the remote-helper it is required that helpers that use 'bidi-import'
+   buffer all 'import' commands of a batch before sending data to 
fast-import.
+This is to prevent mixing commands and fast-import responses on the
+helper's stdin.
+
 Capabilities for Pushing
 
 'connect'::
@@ -286,7 +300,12 @@ terminated with a blank line. For each batch of 'import', 
the remote
 helper should produce a fast-import stream terminated by a 'done'
 command.
 +
-Supported if the helper has the import capability.
+Note that if the 'bidi-import' capability is used the complete batch
+sequence has to be buffered before starting to send data to fast-import
+to prevent mixing of commands and fast-import responses on the helper's
+stdin.
++
+Supported if the helper has the 'import' capability.
 
 'connect' service::
Connects to given service. Standard input and standard output
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 06/16] Add documentation for the 'bidi-import' capability of remote-helpers

2012-08-20 Thread Junio C Hamano
Florian Achleitner florian.achleitner.2.6...@gmail.com writes:

 Signed-off-by: Florian Achleitner florian.achleitner.2.6...@gmail.com
 Signed-off-by: Junio C Hamano gits...@pobox.com
 ---
  Documentation/git-remote-helpers.txt |   21 -
  1 file changed, 20 insertions(+), 1 deletion(-)

 diff --git a/Documentation/git-remote-helpers.txt 
 b/Documentation/git-remote-helpers.txt
 index f5836e4..5faa48e 100644
 --- a/Documentation/git-remote-helpers.txt
 +++ b/Documentation/git-remote-helpers.txt
 @@ -98,6 +98,20 @@ advertised with this capability must cover all refs 
 reported by
  the list command.  If no 'refspec' capability is advertised,
  there is an implied `refspec *:*`.
  
 +'bidi-import'::
 + The fast-import commands 'cat-blob' and 'ls' can be used by 
 remote-helpers
 +to retrieve information about blobs and trees that already exist in
 +fast-import's memory. This requires a channel from fast-import to the
 +remote-helper.
 +If it is advertised in addition to import, git establishes a pipe from
 + fast-import to the remote-helper's stdin.
 + It follows that git and fast-import are both connected to the
 + remote-helper's stdin. Because git can send multiple commands to
 + the remote-helper it is required that helpers that use 'bidi-import'
 + buffer all 'import' commands of a batch before sending data to 
 fast-import.
 +This is to prevent mixing commands and fast-import responses on the
 +helper's stdin.
 +

Funny indentation we see here...

  Capabilities for Pushing
  
  'connect'::
 @@ -286,7 +300,12 @@ terminated with a blank line. For each batch of 
 'import', the remote
  helper should produce a fast-import stream terminated by a 'done'
  command.
  +
 -Supported if the helper has the import capability.
 +Note that if the 'bidi-import' capability is used the complete batch
 +sequence has to be buffered before starting to send data to fast-import
 +to prevent mixing of commands and fast-import responses on the helper's
 +stdin.
 ++
 +Supported if the helper has the 'import' capability.
  
  'connect' service::
   Connects to given service. Standard input and standard output
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html