Skip to content

Commit 6cf9614

Browse files
fingolfingitster
authored andcommitted
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 <[email protected]> Acked-by: Sverre Rabbelier <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0a1b59e commit 6cf9614

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

Documentation/git-remote-helpers.txt

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,37 @@ transport protocols, such as 'git-remote-http', 'git-remote-https',
3535
'git-remote-ftp' and 'git-remote-ftps'. They implement the capabilities
3636
'fetch', 'option', and 'push'.
3737

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+
3869
INPUT FORMAT
3970
------------
4071

@@ -159,37 +190,6 @@ advertised with this capability must cover all refs reported by
159190
the list command. If no 'refspec' capability is advertised,
160191
there is an implied `refspec *:*`.
161192

162-
INVOCATION
163-
----------
164-
165-
Remote helper programs are invoked with one or (optionally) two
166-
arguments. The first argument specifies a remote repository as in git;
167-
it is either the name of a configured remote or a URL. The second
168-
argument specifies a URL; it is usually of the form
169-
'<transport>://<address>', but any arbitrary string is possible.
170-
The 'GIT_DIR' environment variable is set up for the remote helper
171-
and can be used to determine where to store additional data or from
172-
which directory to invoke auxiliary git commands.
173-
174-
When git encounters a URL of the form '<transport>://<address>', where
175-
'<transport>' is a protocol that it cannot handle natively, it
176-
automatically invokes 'git remote-<transport>' with the full URL as
177-
the second argument. If such a URL is encountered directly on the
178-
command line, the first argument is the same as the second, and if it
179-
is encountered in a configured remote, the first argument is the name
180-
of that remote.
181-
182-
A URL of the form '<transport>::<address>' explicitly instructs git to
183-
invoke 'git remote-<transport>' with '<address>' as the second
184-
argument. If such a URL is encountered directly on the command line,
185-
the first argument is '<address>', and if it is encountered in a
186-
configured remote, the first argument is the name of that remote.
187-
188-
Additionally, when a configured remote has 'remote.<name>.vcs' set to
189-
'<transport>', git explicitly invokes 'git remote-<transport>' with
190-
'<name>' as the first argument. If set, the second argument is
191-
'remote.<name>.url'; otherwise, the second argument is omitted.
192-
193193
COMMANDS
194194
--------
195195

0 commit comments

Comments
 (0)