Page MenuHomePhabricator

Handle "-p port" flag in ssh-connect
ClosedPublic

Authored by epriestley on Dec 2 2013, 7:19 PM.
Tags
None
Referenced Files
F19812361: D7680.diff
Wed, Mar 4, 4:41 AM
F19780045: D7680.id17342.diff
Mon, Feb 23, 6:38 PM
F19561758: D7680.id17342.diff
Jan 31 2026, 11:35 AM
F19521370: D7680.id17340.diff
Jan 16 2026, 9:56 PM
F19506619: D7680.id17340.diff
Jan 9 2026, 4:49 PM
F19506097: D7680.id17342.diff
Jan 9 2026, 4:40 PM
F19303235: D7680.id17340.diff
Dec 23 2025, 9:34 PM
F19297237: D7680.id.diff
Dec 23 2025, 12:35 PM
Subscribers

Details

Reviewers
btrahan
Commits
Restricted Diffusion Commit
rPd59722321fe4: Handle "-p port" flag in ssh-connect
Summary

The documentation is explicit that Git does not pass this flag:

The $GIT_SSH command will be given exactly two arguments: the username@host (or just host) from the URL and the shell command to execute on that remote system.

This isn't true; it does. Accommodate it.

I'll see if I can fix this in the upstream, too.

Test Plan

Ran various ssh-connect commands with -p, etc.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This is already fixed in Git's HEAD. The new documentation reads:

The '$GIT_SSH' command will be given exactly two or
four arguments: the 'username@host' (or just 'host')
from the URL and the shell command to execute on that
remote system, optionally preceded by '-p' (literally) and
the 'port' from the URL when it specifies something other
than the default SSH port.