Skip to main content

Module protocol

Module protocol 

Source
Expand description

Protocol allow/deny policy.

Implements the protocol.<name>.allow config and GIT_ALLOW_PROTOCOL environment semantics without reading process-global state directly.

Structs§

ClientProtocolVersionInputs
Explicit inputs for selecting the client-side Git wire protocol version.
ProtocolPolicyInputs
Explicit inputs for protocol allow/deny evaluation.

Enums§

ProtocolError
Errors returned when a transport protocol is not allowed.

Functions§

check_protocol_allowed_with
Check whether a given protocol (e.g. file, git, ssh, https) is allowed.
effective_client_protocol_version_from_inputs
Select the effective client-side protocol version.
merged_git_protocol_value
Merge a requested client protocol version into an existing GIT_PROTOCOL value.
parse_protocol_version_digit
Parse a protocol version digit (0, 1, or 2).
protocol_from_user
Whether protocol.<name>.allow=user should be considered allowed.
server_protocol_version_from_git_protocol
Server-side protocol version: highest version=N from GIT_PROTOCOL, or 0 if unset.