git-remote-helpers.txt: document invocation before input format

In the distant past, the order things were documented was 'Invocation', 'Commands', 'Capabilities', ... Then it was decided that before giving a list of Commands, there should be an overall description of the 'Input format', which was a wise decision. However, this description was put as the very first thing, with the rationale that any implementor would want to know that first. However, it seems an implementor would actually first need to know how the remote helper will be invoked, so moving 'Invocation' to the front again seems logical. Moreover, we now don't switch from discussing the input format to the invocation style and then back to input related stuff. Signed-off-by: Max Horn <max@quendi.de> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Max Horn committed Nov 28, 2012 at 00:03 UTC f829a9eae6adc7e1d02fa28787e43fccaf98c0cc
1 file changed +31 -31
Documentation/git-remote-helpers.txt
+31 -31
@@ -35,6 +35,37 @@ transport protocols, such as 'git-remote-http', 'git-remote-https',
35 'git-remote-ftp' and 'git-remote-ftps'. They implement the capabilities
36 'fetch', 'option', and 'push'.
37
38 +INVOCATION
39 +----------
40 +
41 +Remote helper programs are invoked with one or (optionally) two
42 +arguments. The first argument specifies a remote repository as in git;
43 +it is either the name of a configured remote or a URL. The second
44 +argument specifies a URL; it is usually of the form
45 +'<transport>://<address>', but any arbitrary string is possible.
46 +The 'GIT_DIR' environment variable is set up for the remote helper
47 +and can be used to determine where to store additional data or from
48 +which directory to invoke auxiliary git commands.
49 +
50 +When git encounters a URL of the form '<transport>://<address>', where
51 +'<transport>' is a protocol that it cannot handle natively, it
52 +automatically invokes 'git remote-<transport>' with the full URL as
53 +the second argument. If such a URL is encountered directly on the
54 +command line, the first argument is the same as the second, and if it
55 +is encountered in a configured remote, the first argument is the name
56 +of that remote.
57 +
58 +A URL of the form '<transport>::<address>' explicitly instructs git to
59 +invoke 'git remote-<transport>' with '<address>' as the second
60 +argument. If such a URL is encountered directly on the command line,
61 +the first argument is '<address>', and if it is encountered in a
62 +configured remote, the first argument is the name of that remote.
63 +
64 +Additionally, when a configured remote has 'remote.<name>.vcs' set to
65 +'<transport>', git explicitly invokes 'git remote-<transport>' with
66 +'<name>' as the first argument. If set, the second argument is
67 +'remote.<name>.url'; otherwise, the second argument is omitted.
68 +
69 INPUT FORMAT
70 ------------
71
@@ -173,37 +204,6 @@ advertised with this capability must cover all refs reported by
204 the list command. If no 'refspec' capability is advertised,
205 there is an implied `refspec *:*`.
206
176 -INVOCATION
177 -----------
178 -
179 -Remote helper programs are invoked with one or (optionally) two
180 -arguments. The first argument specifies a remote repository as in git;
181 -it is either the name of a configured remote or a URL. The second
182 -argument specifies a URL; it is usually of the form
183 -'<transport>://<address>', but any arbitrary string is possible.
184 -The 'GIT_DIR' environment variable is set up for the remote helper
185 -and can be used to determine where to store additional data or from
186 -which directory to invoke auxiliary git commands.
187 -
188 -When git encounters a URL of the form '<transport>://<address>', where
189 -'<transport>' is a protocol that it cannot handle natively, it
190 -automatically invokes 'git remote-<transport>' with the full URL as
191 -the second argument. If such a URL is encountered directly on the
192 -command line, the first argument is the same as the second, and if it
193 -is encountered in a configured remote, the first argument is the name
194 -of that remote.
195 -
196 -A URL of the form '<transport>::<address>' explicitly instructs git to
197 -invoke 'git remote-<transport>' with '<address>' as the second
198 -argument. If such a URL is encountered directly on the command line,
199 -the first argument is '<address>', and if it is encountered in a
200 -configured remote, the first argument is the name of that remote.
201 -
202 -Additionally, when a configured remote has 'remote.<name>.vcs' set to
203 -'<transport>', git explicitly invokes 'git remote-<transport>' with
204 -'<name>' as the first argument. If set, the second argument is
205 -'remote.<name>.url'; otherwise, the second argument is omitted.
206 -
207 COMMANDS
208 --------
209