Skip to content

Commit f829a9e

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 b7973fb commit f829a9e

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

@@ -173,37 +204,6 @@ advertised with this capability must cover all refs reported by
173204
the list command. If no 'refspec' capability is advertised,
174205
there is an implied `refspec *:*`.
175206

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-
207207
COMMANDS
208208
--------
209209

0 commit comments

Comments
 (0)