Skip to main content

Crate grit_protocol

Crate grit_protocol 

Source
Expand description

Git smart protocol handlers for HTTP transport.

Runs upload-pack and receive-pack in-process via grit_lib::remote::serve, with no subprocess or external grit binary. Every push runs the PushGuard, which keeps pushes off the target branch of a repository with snapshot checkouts.

Re-exports§

pub use session::ReceiveRpcResult;
pub use session::ServeSession;

Modules§

receive_pack
Receive-pack protocol handler (server side of push).
session
Per-request session controls for smart-protocol handlers.
upload_pack
Upload-pack protocol handler (server side of fetch/clone).

Structs§

Extensions
Server features beyond plain fetch and push, for the _with handlers.
PushGuard
The in-process checks every push these handlers serve gets.
RepositoryOptions
Options passed to crate::repo::Repository::open, crate::repo::Repository::discover, and related entry points.

Enums§

Error
Errors from smart-protocol handlers.

Functions§

protocol_version_from_header
Map an explicit smart-HTTP protocol version header to a wire version.
repository_options_from_process
Build RepositoryOptions from the current process environment (RepositoryOptions::from_process).
validate_repo_path
Validate that a path looks like a git repository (bare or non-bare).

Type Aliases§

Result
Result alias for protocol handlers.