Skip to main content

Crate sley_refs

Crate sley_refs 

Source

Structs§

AppliedBundleRefUpdate
BranchCreate
BranchDelete
BranchRefName
BranchRefNameBuf
BundleRefUpdate
BundleRefUpdateReflog
DeleteRef
DeleteRefReflog
FileRefStore
FileRefTransaction
FullRefName
FullRefNameBuf
PackedRef
Ref
RefDelete
RefStore
RefTransaction
RefTransactionHookUpdate
One queued ref change as the reference-transaction hook sees it: the <old-value> SP <new-value> SP <refname> triple git writes to the hook’s stdin (refs.c:transaction_hook_feed_stdin). old_value/new_value are already rendered the way git renders them — a 40/64-hex OID, the string ref:<target> for a symref, or the all-zeros OID when the side is absent.
RefUpdate
ReflogEntry
RemoteRefName
RemoteRefNameBuf
TagCreate
TagDelete
TagRefName
TagRefNameBuf

Enums§

PackRefDecision
RefDeleteError
RefDeletePrecondition
The compare-and-delete precondition checked for a queued ref delete.
RefPrecondition
The compare-and-swap precondition a ref update is checked against (re-verified while the ref is locked, so it is a true CAS, not a check-then-write).
RefTarget
RefTransactionPhase
The phase a ReferenceTransactionHook is invoked for, mirroring the state argument git passes to the reference-transaction hook (refs.c:run_transaction_hook).

Traits§

ReferenceTransactionHook
A handler the file backend invokes at each phase of a ref transaction so the CLI layer can run the project’s reference-transaction hook. Implemented in sley-cli; the backend stays oblivious to how (or whether) a hook script is found and executed.

Functions§

branch_ref_name
branch_ref_name_for_read
branch_ref_name_for_source
check_refname_format
Validate a ref name using git’s check_refname_format rules.
expire_reflog
Expire reflog entries, mirroring git reflog expire semantics.
parse_loose_ref
parse_packed_refs
parse_reflog
refname_is_safe
git’s refname_is_safe (refs.c): the gate applied when deleting a ref (transaction_refname_valid with a null new-oid). It is stricter than the create-time check_refname_format(_, REFNAME_ALLOW_ONELEVEL):
resolve_ref_peeled
tag_ref_name
validate_ref_name
validate_ref_name_for_read
validate_ref_name_for_update
validate_symref_name
Validate a symbolic ref name (HEAD, one-level pseudo-refs, or refs/...).
validate_symref_target
Validate a symbolic ref target (one-level pseudo-refs or refs/...).
write_loose_ref
write_packed_refs