Skip to content

Commit 754cb1a

Browse files
fingolfingitster
authored andcommitted
git-remote-helpers.txt: clarify command <-> capability correspondences
In particular, document 'list for-push' separately from 'list', as the former needs only be supported for the push/export capabilities, and the latter only for fetch/import. Indeed, a hypothetically 'push-only' helper would only need to support the former, not the latter. Signed-off-by: Max Horn <[email protected]> Acked-by: Sverre Rabbelier <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0673bb2 commit 754cb1a

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

Documentation/git-remote-helpers.txt

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ Commands are given by the caller on the helper's standard input, one per line.
216216
which marks them mandatory for git versions using the remote
217217
helper to understand. Any unknown mandatory capability is a
218218
fatal error.
219+
+
220+
Support for this command is mandatory.
219221

220222
'list'::
221223
Lists the refs, one per line, in the format "<value> <name>
@@ -225,9 +227,18 @@ Commands are given by the caller on the helper's standard input, one per line.
225227
the name; unrecognized attributes are ignored. The list ends
226228
with a blank line.
227229
+
228-
If 'push' is supported this may be called as 'list for-push'
229-
to obtain the current refs prior to sending one or more 'push'
230-
commands to the helper.
230+
Supported if the helper has the "fetch" or "import" capability.
231+
232+
'list for-push'::
233+
Similar to 'list', except that it is used if and only if
234+
the caller wants to the resulting ref list to prepare
235+
push commands.
236+
A helper supporting both push and fetch can use this
237+
to distinguish for which operation the output of 'list'
238+
is going to be used, possibly reducing the amount
239+
of work that needs to be performed.
240+
+
241+
Supported if the helper has the "push" or "export" capability.
231242

232243
'option' <name> <value>::
233244
Sets the transport helper option <name> to <value>. Outputs a
@@ -306,7 +317,7 @@ sequence has to be buffered before starting to send data to fast-import
306317
to prevent mixing of commands and fast-import responses on the helper's
307318
stdin.
308319
+
309-
Supported if the helper has the 'import' capability.
320+
Supported if the helper has the "import" capability.
310321

311322
'export'::
312323
Instructs the remote helper that any subsequent input is
@@ -322,7 +333,7 @@ fast-export', which then will load/store a table of marks for
322333
local objects. This can be used to implement for incremental
323334
operations.
324335
+
325-
Supported if the helper has the 'export' capability.
336+
Supported if the helper has the "export" capability.
326337

327338
'connect' <service>::
328339
Connects to given service. Standard input and standard output

0 commit comments

Comments
 (0)