Expand description
Native git operations layered on top of gix.
Operations that gix 0.82 exposes go through gix natively; config
reads/writes go through gix-config + gix-lock for atomic edits
parity with git config. Bundle creation and consumption use the
native gix-pack-based implementation in [crate::bundle]; no
git subprocess is spawned at runtime.
Structs§
- RefName
- Validated git ref name — guaranteed to satisfy
gix_validate::reference::name(the strict, fully-qualified form). - Sha
- SHA-1 object OID, displayed as 40 lowercase hex characters.
Enums§
- GitError
- Aggregate error for the helpers in this module.
- RefName
Error - Error returned by
RefName::new. - ShaError
- Error returned by
Sha::from_hex.
Functions§
- archive
- Write a zip archive of the tree at
specto<folder>/repo.zipand return the path. - bundle
- Write a git bundle for
specto<folder>/<sha>.bundleand return the absolute path. - bundle_
at - Path-only variant of
bundlefor callers that cannot hold a&Repositoryacross.await(the protocol push handler shares state across tokio tasks;gix::Repositoryis!Sync, so its future would not beSend). - config_
add - Add a multi-value entry to the repository’s local config (
<section>[.<subsection>].<name> = value). - config_
add_ many - Batched variant of
config_add: applies every(key, value)entry to the local config in a single read / parse / lock / write cycle. - config_
set - Set a single-value entry in the repository’s local config, replacing any existing values for the key.
- config_
set_ many - Batched variant of
config_set: applies every(key, value)entry to the local config in a single read / parse / lock / write cycle. - config_
unset - Remove the latest value for the given key from the repository’s local config.
- config_
unset_ if_ present - Idempotent variant of
config_unset: succeeds even when the key is already absent. - is_
ancestor - Return
trueiffancestoris an ancestor ofdescendant(or equals it). - is_
valid_ ref_ name - Permissive ref-name predicate.
- last_
commit_ message - Format
HEAD’s commit as"<short-sha> <subject>", matching upstreamgit log -1 --pretty=%h %s. Used asCodePipelinemetadata in thes3+zippush variant. - remote_
url - Read a remote’s URL out of the repository’s configuration.
- unbundle
- Unbundle
<folder>/<sha>.bundleintorepo. - unbundle_
at - Path-only variant of
unbundlefor callers that cannot hold a&Repositoryacross.await(notably the parallel fetch handler:gix::Repositoryis!Sync, so it cannot be shared across concurrent tasks).