Skip to main content

Module protocol

Module protocol 

Source
Expand description

Git remote-helper protocol REPL and command dispatcher.

run is generic over its reader and writer so tests can drive it through tokio::io::duplex.

Stdout is the wire protocol — see .claude/rules/protocol-stdout.md. Diagnostics use tracing (configured to write to stderr by tracing_init::init); the only stdout writes happen via the per-command handlers below.

Modules§

backend
Backend factory: turns a parsed RemoteUrl into an Arc<dyn ObjectStore> for the protocol REPL to drive.
fetch
Parallel fetch handler.
push
push handler with per-ref locking via conditional writes.
tracing_init
Stderr-only tracing subscriber for the helper-protocol binaries.

Enums§

ProtocolError
Errors surfaced by the REPL loop.

Functions§

run
Run the helper REPL until stdin closes (clean exit) or the writer breaks (BrokenPipe — also a clean exit).