Documentation/git-remote-helpers: explain how import works with multiple refs

This is important for two reasons: * when two "import" lines follow each other, only one "done" command should be issued in the fast-import stream, not one per "import". * The blank line terminating an import command should not be confused with the one terminating the sequence of commands. While we're there, illustrate the corresponding explanation for push batches with an example. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthieu Moy committed Sep 1, 2011 at 18:49 UTC 960e3114963dbb290c12f7a4d19c5776584d43ff
1 file changed +21 -1
Documentation/git-remote-helpers.txt
+21 -1
@@ -241,7 +241,22 @@ Supported if the helper has the "fetch" capability.
241 'push' +<src>:<dst>::
242 Pushes the given local <src> commit or branch to the
243 remote branch described by <dst>. A batch sequence of
244 - one or more push commands is terminated with a blank line.
244 + one or more 'push' commands is terminated with a blank line
245 + (if there is only one reference to push, a single 'push' command
246 + is followed by a blank line). For example, the following would
247 + be two batches of 'push', the first asking the remote-helper
248 + to push the local ref 'master' to the remote ref 'master' and
249 + the local 'HEAD' to the remote 'branch', and the second
250 + asking to push ref 'foo' to ref 'bar' (forced update requested
251 + by the '+').
252 ++
253 +------------
254 +push refs/heads/master:refs/heads/master
255 +push HEAD:refs/heads/branch
256 +\n
257 +push +refs/heads/foo:refs/heads/bar
258 +\n
259 +------------
260 +
261 Zero or more protocol options may be entered after the last 'push'
262 command, before the batch's terminating blank line.
@@ -266,6 +281,11 @@ Supported if the helper has the "push" capability.
281 Especially useful for interoperability with a foreign versioning
282 system.
283 +
284 +Just like 'push', a batch sequence of one or more 'import' is
285 +terminated with a blank line. For each batch of 'import', the remote
286 +helper should produce a fast-import stream terminated by a 'done'
287 +command.
288 ++
289 Supported if the helper has the "import" capability.
290
291 'connect' <service>::