help: include <common-cmds.h> only in one file
[gitweb.git] / Documentation / git-remote-helpers.txt
index 7ac1461a1ab8a329313e9451889376d14a2b4578..6d696e0f90b3f0b67adde7ef4aa4fa6816e391eb 100644 (file)
@@ -216,6 +216,8 @@ Commands are given by the caller on the helper's standard input, one per line.
        which marks them mandatory for git versions using the remote
        helper to understand. Any unknown mandatory capability is a
        fatal error.
++
+Support for this command is mandatory.
 
 'list'::
        Lists the refs, one per line, in the format "<value> <name>
@@ -225,9 +227,20 @@ Commands are given by the caller on the helper's standard input, one per line.
        the name; unrecognized attributes are ignored. The list ends
        with a blank line.
 +
-If 'push' is supported this may be called as 'list for-push'
-to obtain the current refs prior to sending one or more 'push'
-commands to the helper.
+See REF LIST ATTRIBUTES for a list of currently defined attributes.
++
+Supported if the helper has the "fetch" or "import" capability.
+
+'list for-push'::
+       Similar to 'list', except that it is used if and only if
+       the caller wants to the resulting ref list to prepare
+       push commands.
+       A helper supporting both push and fetch can use this
+       to distinguish for which operation the output of 'list'
+       is going to be used, possibly reducing the amount
+       of work that needs to be performed.
++
+Supported if the helper has the "push" or "export" capability.
 
 'option' <name> <value>::
        Sets the transport helper option <name> to <value>.  Outputs a
@@ -237,6 +250,8 @@ commands to the helper.
        for it).  Options should be set before other commands,
        and may influence the behavior of those commands.
 +
+See OPTIONS for a list of currently defined options.
++
 Supported if the helper has the "option" capability.
 
 'fetch' <sha1> <name>::
@@ -245,7 +260,7 @@ Supported if the helper has the "option" capability.
        per line, terminated with a blank line.
        Outputs a single blank line when all fetch commands in the
        same batch are complete. Only objects which were reported
-       in the ref list with a sha1 may be fetched this way.
+       in the output of 'list' with a sha1 may be fetched this way.
 +
 Optionally may output a 'lock <file>' line indicating a file under
 GIT_DIR/objects/pack which is keeping a pack until refs can be
@@ -306,7 +321,7 @@ 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.
+Supported if the helper has the "import" capability.
 
 'export'::
        Instructs the remote helper that any subsequent input is
@@ -322,7 +337,7 @@ fast-export', which then will load/store a table of marks for
 local objects. This can be used to implement for incremental
 operations.
 +
-Supported if the helper has the 'export' capability.
+Supported if the helper has the "export" capability.
 
 'connect' <service>::
        Connects to given service. Standard input and standard output
@@ -349,10 +364,9 @@ capabilities reported by the helper.
 REF LIST ATTRIBUTES
 -------------------
 
-'for-push'::
-       The caller wants to use the ref list to prepare push
-       commands.  A helper might chose to acquire the ref list by
-       opening a different type of connection to the destination.
+The 'list' command produces a list of refs in which each ref
+may be followed by a list of attributes. The following ref list
+attributes are defined.
 
 'unchanged'::
        This ref is unchanged since the last import or fetch, although
@@ -360,6 +374,10 @@ REF LIST ATTRIBUTES
 
 OPTIONS
 -------
+
+The following options are defined and (under suitable circumstances)
+set by git if the remote helper has the 'option' capability.
+
 'option verbosity' <n>::
        Changes the verbosity of messages displayed by the helper.
        A value of 0 for <n> means that processes operate