Expand description
Pure-Rust git-over-SSH (via russh) — no ssh subprocess, honoring
nornir’s no-shellout rule (gix’s own SSH transport execs ssh, which is why
crate::gitio refuses SSH and defers here).
Implemented:
ls-remote— connect, authenticate with the nornir ed25519 deploy key, rungit-upload-pack '<path>', and parse the server’s ref advertisement (pkt-line) into(sha, refname)pairs. The cheap poll primitive.- pack transfer (fetch/clone) —
connect_upload_packexecsgit-upload-packand exposes the channel as blockingRead/Write(bridged from russh’s async channel viatokio_util’sSyncIoBridge).crate::gitiohands that to gix’s blocking git transport (ConnectMode::Process), so gix drives the full object negotiation and pack indexing — nossh/gitsubprocess, no hand-rolled packfile code.
Not yet: git-receive-pack (SSH push). The URL- and pkt-line parsers
below are transport-agnostic and unit-tested.
Structs§
- SshLocation
- A parsed SSH git location.
- Upload
Pack - An authenticated
git-upload-packchannel exposed as blockingRead/Write.
Functions§
- connect_
upload_ pack - Open an authenticated
git-upload-packchannel tolocand return it as blocking I/O for gix’s transport. SeeUploadPack. - ls_
remote ls-remoteover SSH: connect toloc, rungit-upload-pack, and return the advertised refs (reading only the initial ref advertisement — no negotiation).- ls_
remote_ blocking - Blocking wrapper for the sync fetch/poll path: spins a small current-thread
runtime and runs
ls_remote. - parse_
ref_ advertisement - Parse a git smart-protocol ref advertisement (the bytes a server emits
right after
git-upload-pack) into(sha, refname)pairs. - parse_
ssh_ url - Parse
git@host:owner/repo(.git)(scp-like) orssh://[user@]host[:port]/pathinto anSshLocation. Defaults: usergit, port22.