Skip to content

Commit e39c695

Browse files
danfuzzgitster
authored andcommitted
Correct the docs about GIT_SSH.
In particular, it can get called with four arguments if you happen to be referring to a repo using the ssh:// scheme with a non-default port number. Signed-off-by: Dan Bornstein <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7c1017d commit e39c695

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Documentation/git.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,12 @@ other
764764
If this environment variable is set then 'git fetch'
765765
and 'git push' will use this command instead
766766
of 'ssh' when they need to connect to a remote system.
767-
The '$GIT_SSH' command will be given exactly two arguments:
768-
the 'username@host' (or just 'host') from the URL and the
769-
shell command to execute on that remote system.
767+
The '$GIT_SSH' command will be given exactly two or
768+
four arguments: the 'username@host' (or just 'host')
769+
from the URL and the shell command to execute on that
770+
remote system, optionally preceded by '-p' (literally) and
771+
the 'port' from the URL when it specifies something other
772+
than the default SSH port.
770773
+
771774
To pass options to the program that you want to list in GIT_SSH
772775
you will need to wrap the program and options into a shell script,

0 commit comments

Comments
 (0)