git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Horn <max@quendi.de>
To: git@vger.kernel.org
Cc: Max Horn <max@quendi.de>
Subject: [PATCH v2 5/6] git-remote-helpers.txt: clarify command <-> capability correspondences
Date: Wed, 28 Nov 2012 00:03:25 +0100	[thread overview]
Message-ID: <1354057407-83151-6-git-send-email-max@quendi.de> (raw)
In-Reply-To: <1354057407-83151-1-git-send-email-max@quendi.de>

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 <max@quendi.de>
---
 Documentation/git-remote-helpers.txt | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-remote-helpers.txt b/Documentation/git-remote-helpers.txt
index 7ac1461..023dcca 100644
--- a/Documentation/git-remote-helpers.txt
+++ b/Documentation/git-remote-helpers.txt
@@ -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,18 @@ 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.
+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
@@ -306,7 +317,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 +333,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
-- 
1.8.0.393.gcc9701d

  parent reply	other threads:[~2012-11-27 23:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 23:03 [PATCH v2 0/6] Improve remote helper documentation Max Horn
2012-11-27 23:03 ` [PATCH v2 1/6] git-remote-helpers.txt: document invocation before input format Max Horn
2012-12-12 22:14   ` Felipe Contreras
2012-12-12 22:58     ` Max Horn
2012-12-12 23:00       ` Felipe Contreras
2012-12-12 23:05         ` Max Horn
2012-12-12 23:13           ` Junio C Hamano
2012-12-12 23:15             ` Max Horn
2012-12-12 23:03       ` Junio C Hamano
2012-11-27 23:03 ` [PATCH v2 2/6] git-remote-helpers.txt: document missing capabilities Max Horn
2012-11-27 23:03 ` [PATCH v2 3/6] git-remote-helpers.txt: minor grammar fix Max Horn
2012-11-27 23:03 ` [PATCH v2 4/6] git-remote-helpers.txt: rearrange description of capabilities Max Horn
2012-11-27 23:03 ` Max Horn [this message]
2012-11-27 23:03 ` [PATCH v2 6/6] git-remote-helpers.txt: clarify options & ref list attributes Max Horn
2012-11-27 23:03 ` [PATCH 6/6] git-remote-helpers.txt: clarify ref list attributes, link to subsections Max Horn
2012-11-27 23:06   ` Max Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354057407-83151-6-git-send-email-max@quendi.de \
    --to=max@quendi.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).