Docs.rs
  • git-repository-0.26.0
    • git-repository 0.26.0
    • Docs.rs crate page
    • MIT/Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • Byron
    • Dependencies
      • async-std ^1.12.0 normal
      • byte-unit ^4.0 normal
      • clru ^0.5.0 normal
      • document-features ^0.2.0 normal
      • git-actor ^0.13.0 normal
      • git-attributes ^0.5.0 normal
      • git-config ^0.10.0 normal
      • git-credentials ^0.6.1 normal
      • git-date ^0.2.0 normal
      • git-diff ^0.21.0 normal
      • git-discover ^0.7.0 normal
      • git-features ^0.23.1 normal
      • git-glob ^0.4.1 normal
      • git-hash ^0.9.11 normal
      • git-index ^0.7.0 normal
      • git-lock ^2.0.0 normal
      • git-mailmap ^0.5.0 normal
      • git-object ^0.22.1 normal
      • git-odb ^0.35.0 normal
      • git-pack ^0.25.0 normal
      • git-path ^0.5.0 normal
      • git-prompt ^0.1.1 normal
      • git-protocol ^0.22.0 normal
      • git-ref ^0.18.0 normal
      • git-refspec ^0.3.1 normal
      • git-revision ^0.6.0 normal
      • git-sec ^0.4.2 normal
      • git-tempfile ^2.0.0 normal
      • git-transport ^0.21.1 normal
      • git-traverse ^0.18.0 normal
      • git-url ^0.10.1 normal
      • git-validate ^0.6.0 normal
      • git-worktree ^0.7.0 normal
      • log ^0.4.14 normal
      • once_cell ^1.14.0 normal
      • regex ^1.6.0 normal
      • serde ^1.0.114 normal
      • signal-hook ^0.3.9 normal
      • smallvec ^1.9.0 normal
      • thiserror ^1.0.26 normal
      • anyhow ^1 dev
      • is_ci ^1.1.1 dev
      • serial_test ^0.9.0 dev
      • walkdir ^2.3.2 dev
      • unicode-normalization ^0.1.19 normal
    • Versions
    • 100% of the crate is documented
  • Go to latest version
  • Platform
    • i686-unknown-linux-gnu
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
logo

Crate git_repository

logo

Crate git_repository

  • Version 0.26.0
  • All Items
  • Re-exports
  • Modules
  • Structs
  • Enums
  • Traits
  • Functions
  • Type Definitions

Crates

  • git_repository
?
Change settings

Crate git_repository

source ·
Expand description

This crate provides the Repository abstraction which serves as a hub into all the functionality of git.

It’s powerful and won’t sacrifice performance while still increasing convenience compared to using the sub-crates individually. Sometimes it may hide complexity under the assumption that the performance difference doesn’t matter for all but the fewest tools out there, which would be using the underlying crates directly or file an issue.

The prelude and extensions

With use git_repository::prelude::* you should be ready to go as it pulls in various extension traits to make functionality available on objects that may use it.

The method signatures are still complex and may require various arguments for configuration and cache control.

Most extensions to existing objects provide an obj_with_extension.attach(&repo).an_easier_version_of_a_method() for simpler call signatures.

ThreadSafe Mode

By default, the Repository isn’t Sync and thus can’t be used in certain contexts which require the Sync trait.

To help with this, convert it with .to_sync() into a ThreadSafeRepository.

Object-Access Performance

Accessing objects quickly is the bread-and-butter of working with git, right after accessing references. Hence it’s vital to understand which cache levels exist and how to leverage them.

When accessing an object, the first cache that’s queried is a memory-capped LRU object cache, mapping their id to data and kind. On miss, the object is looked up and if a pack is hit, there is a small fixed-size cache for delta-base objects.

In scenarios where the same objects are accessed multiple times, an object cache can be useful and is to be configured specifically using the object_cache_size(…) method.

Use the cache-efficiency-debug cargo feature to learn how efficient the cache actually is - it’s easy to end up with lowered performance if the cache is not hit in 50% of the time.

Environment variables can also be used for configuration if the application is calling apply_environment().

Shortcomings & Limitations

  • Only a single crate::object or derivatives can be held in memory at a time, per Easy*.
  • Changes made to the configuration, packs, and alternates aren’t picked up automatically, but the current object store needs a manual refresh.

Design Sketch

Goal is to make the lower-level plumbing available without having to deal with any caches or buffers, and avoid any allocation beyond sizing the buffer to fit the biggest object seen so far.

  • no implicit object lookups, thus Oid needs to get an Object first to start out with data via object()
  • Objects with Ref suffix can only exist one at a time unless they are transformed into an owned version of it OR multiple Easy handles are present, each providing another ‘slot’ for an object as long as its retrieved through the respective Easy object.
  • ObjectRef blocks the current buffer, hence many of its operations that use the buffer are consuming
  • All methods that access a any field from Easy’s mutable State are fallible, and return easy::Result<_> at least, to avoid panics if the field can’t be referenced due to borrow rules of RefCell.
  • Anything attached to Access can be detached to lift the object limit or make them Send-able. They can be attached to another Access if needed.
  • git-repository functions related to Access extensions will always return attached versions of return values, like Oid instead of git_hash::ObjectId, ObjectRef instead of git_odb::data::Object, or Reference instead of git_ref::Reference.
  • Obtaining mutable is currently a weak spot as these only work with Arc right now and can’t work with Rc<RefCell> due to missing GATs, presumably. All Easy*!Exclusive types are unable to provide a mutable reference to the underlying repository. However, other ways to adjust the Repository of long-running applications are possible. For instance, there could be a flag that indicates a new Repository should be created (for instance, after it was changed) which causes the next server connection to create a new one. This instance is the one to use when spawning new EasyArc instances.
  • Platform types are used to hold mutable or shared versions of required state for use in dependent objects they create, like iterators. These come with the benefit of allowing for nicely readable call chains. Sometimes these are called Platform for a lack of a more specific term, some are called more specifically like Ancestors.

Terminology

WorkingTree and WorkTree

When reading the documentation of the canonical git-worktree program one gets the impression work tree and working tree are used interchangeably. We use the term work tree only and try to do so consistently as its shorter and assumed to be the same.

Cargo-features

To make using sub-crates easier these are re-exported into the root of this crate. Note that these may change their major version even if this crate doesn’t, hence breaking downstream.

git_repository::

  • attrs
  • hash
  • url
  • actor
  • [bstr][bstr]
  • date
  • discover
  • index
  • glob
  • path
  • credentials
  • prompt
  • sec
  • worktree
  • mailmap
  • objs
  • odb
    • pack
  • refs
  • revision
  • interrupt
  • tempfile
  • lock
  • traverse
  • diff
  • parallel
  • refspec
  • Progress
  • progress
  • interrupt
  • protocol
    • transport
      • [packetline][protocol::transport::packetline]

Feature Flags

Mutually Exclusive Network Client

Either async-* or blocking-* versions of these toggles may be enabled at a time.

  • async-network-client — Make git-protocol available along with an async client.

  • async-network-client-async-std — Use this if your crate uses async-std as runtime, and enable basic runtime integration when connecting to remote servers.

  • blocking-network-client — Make git-protocol available along with a blocking client.

  • blocking-http-transport — Stacks with blocking-network-client to provide support for HTTP/S, and implies blocking networking as a whole.

Other

  • serde1 — Data structures implement serde::Serialize and serde::Deserialize.

  • max-performance (enabled by default) — Activate other features that maximize performance, like usage of threads, zlib-ng and access to caching in object databases. Note that some platforms might suffer from compile failures, which is when max-performance-safe should be used.

  • fast-sha1 — If enabled, use assembly versions of sha1 on supported platforms. This might cause compile failures as well which is why it can be turned off separately.

  • max-performance-safe — Activate features that maximize performance, like usage of threads, zlib-ng and access to caching in object databases, skipping the ones known to cause compile failures on some platforms.

  • cache-efficiency-debug — Print debugging information about usage of object database caches, useful for tuning cache sizes.

  • regex — For use in rev-parse, which provides searching commits by running a regex on their message.

    If disabled, the text will be search verbatim in any portion of the commit message, similar to how a simple unanchored regex of only ‘normal’ characters would work.

Re-exports

pub use git_actor as actor;
pub use git_attributes as attrs;
pub use git_credentials as credentials;
pub use git_date as date;
pub use git_diff as diff;
pub use git_glob as glob;
pub use git_hash as hash;
pub use git_lock as lock;
pub use git_object as objs;
pub use git_object::bstr;
pub use git_odb as odb;
pub use git_prompt as prompt;
pub use git_protocol as protocol;
pub use git_ref as refs;
pub use git_refspec as refspec;
pub use git_sec as sec;
pub use git_tempfile as tempfile;
pub use git_traverse as traverse;
pub use git_url as url;

Modules

clone
commit
config
create
discover
env
head
id
index
Feature Flags
init
interrupt
Process-global interrupt handling
mailmap
object
open
parallel
Run computations in parallel, or not based the parallel feature toggle.
path
permission
permissions
prelude
progressprogress
Various prodash types along with various utilities for comfort.
reference
remote
revision
Revisions is the generalized notion of a commit.
state
Not to be confused with ‘status’.
tag
threading
Type definitions for putting shared ownership and synchronized mutation behind the threading feature toggle.
worktree

Structs

Commit
A decoded commit object with access to its owning repository.
Head
The head reference, as created from looking at .git/HEAD, able to represent all of its possible states.
Id
An ObjectId with access to a repository.
Object
A decoded object with a reference to its owning repository.
ObjectDetached
A detached, self-contained object, without access to its source repository.
Permissions
Permissions associated with various resources of a git repository
Reference
A reference that points to an object or reference, with access to its source repository.
Remote
A remote which represents a way to interact with hosts for remote clones of the parent repository.
Repository
A thread-local handle to interact with a repository from a single thread.
Tag
A decoded tag object with access to its owning repository.
ThreadSafeRepository
An instance with access to everything a git repository entails, best imagined as container implementing Sync + Send for most for system resources required to interact with a git repository which are loaded in once the instance is created.
Tree
A decoded tree object with access to its owning repository.
Url
A URL with support for specialized git related capabilities.
Worktree
A worktree checkout containing the files of the repository in consumable form.
oid
A borrowed reference to a hash identifying objects.

Enums

Kind
The kind of repository.
ObjectId
An owned hash identifying objects, most commonly Sha1

Traits

Progress
A trait for describing hierarchical process.

Functions

discover
See ThreadSafeRepository::discover(), but returns a Repository instead.
init
See ThreadSafeRepository::init(), but returns a Repository instead.
init_bare
See ThreadSafeRepository::init(), but returns a Repository instead.
open
See ThreadSafeRepository::open(), but returns a Repository instead.
open_opts
See ThreadSafeRepository::open_opts(), but returns a Repository instead.
prepare_clone
Create a platform for configuring a clone with main working tree from url to the local path, using default options for opening it (but amended with using configuration from the git installation to ensure all authentication options are honored).
prepare_clone_bare
Create a platform for configuring a bare clone from url to the local path, using default options for opening it (but amended with using configuration from the git installation to ensure all authentication options are honored).

Type Definitions

OdbHandle
A handle for finding objects in an object database, abstracting away caches for thread-local use.
RefStore
The standard type for a store to handle git references.

Results

git_repository::permissions::Environment::home
Control the way resources pointed to by the home directory …
git_repository::config::file::Metadata::at
Set the metadata to be located at the given path.
git_repository::index::File::at
Open an index file at path with options, assuming …
git_repository::config::color::Attribute::UL
git_repository::Permissions::all
Everything is allowed with this set of permissions, thus …
git_repository::config::color::Attribute::all
Returns the set containing all flags.
git_repository::index::entry::Mode::all
Returns the set containing all flags.
git_repository::index::entry::Flags::all
Returns the set containing all flags.
git_repository::permissions::Config::all
Allow everything which usually relates to a fully trusted …
git_repository::permissions::Environment::all
Allow access to the entire environment.
git_repository::progress::unit::display::UnitDisplay::all
Display everything, values and the unit.
git_repository::reference::iter::Platform::all
Return an iterator over all references in the repository.
git_repository::revision::walk::Platform::all
Return an iterator to traverse all commits reachable as …
git_repository::index::write::Extensions::All
Writes all available optional extensions to avoid loosing …
git_repository::index::Entry::cmp
Compare one entry to another by their path, by comparing …
git_repository::oid::cmp
git_repository::Url::cmp
git_repository::ObjectId::cmp
git_repository::Kind::cmp
git_repository::commit::describe::SelectRef::cmp
git_repository::config::Color::cmp
git_repository::config::Integer::cmp
git_repository::config::Boolean::cmp
git_repository::config::Path::cmp
git_repository::config::Source::cmp
git_repository::config::color::Name::cmp
git_repository::config::color::Attribute::cmp
git_repository::config::file::SectionMut::cmp
git_repository::config::file::ValueMut::cmp
git_repository::config::file::Metadata::cmp
git_repository::config::file::Section::cmp
git_repository::config::file::SectionId::cmp
git_repository::config::file::section::Body::cmp
git_repository::config::integer::Suffix::cmp
git_repository::config::parse::Events::cmp
git_repository::config::parse::Key::cmp
git_repository::config::parse::Event::cmp
git_repository::config::parse::Section::cmp
git_repository::config::parse::Comment::cmp
git_repository::config::parse::section::Header::cmp
git_repository::config::parse::section::Name::cmp
git_repository::config::parse::section::Key::cmp
git_repository::config::source::Kind::cmp
git_repository::discover::repository::Path::cmp
git_repository::discover::repository::Kind::cmp
git_repository::index::Version::cmp
git_repository::index::entry::Mode::cmp
git_repository::index::entry::Flags::cmp
git_repository::index::entry::Time::cmp
git_repository::index::entry::Stat::cmp
git_repository::mailmap::Entry::cmp
git_repository::mailmap::snapshot::Signature::cmp
git_repository::object::Kind::cmp
git_repository::object::tree::diff::Action::cmp
git_repository::permissions::Config::cmp
git_repository::progress::MessageLevel::cmp
git_repository::progress::unit::Bytes::cmp
git_repository::progress::unit::Range::cmp
git_repository::progress::unit::display::Location::cmp
git_repository::progress::unit::display::Throughput::cmp
git_repository::progress::unit::display::Mode::cmp
git_repository::reference::Kind::cmp
git_repository::reference::Category::cmp
git_repository::worktree::fs::Capabilities::cmp
git_repository::worktree::index::checkout::Collision::cmp
git_repository::config::color::Attribute::DIM
git_repository::oid::fmt
git_repository::Url::fmt
git_repository::Object::fmt
git_repository::Tree::fmt
git_repository::Commit::fmt
git_repository::Repository::fmt
git_repository::ObjectId::fmt
git_repository::ThreadSafeRepository::fmt
git_repository::Kind::fmt
git_repository::Id::fmt
git_repository::ObjectDetached::fmt
git_repository::Reference::fmt
git_repository::Remote::fmt
git_repository::Permissions::fmt
git_repository::clone::Error::fmt
git_repository::clone::checkout::main_worktree::Error::fmt
git_repository::clone::fetch::Error::fmt
git_repository::commit::Error::fmt
git_repository::commit::describe::Error::fmt
git_repository::commit::describe::SelectRef::fmt
git_repository::config::Color::fmt
git_repository::config::Integer::fmt
git_repository::config::Boolean::fmt
git_repository::config::Path::fmt
git_repository::config::Snapshot::fmt
git_repository::config::SnapshotMut::fmt
git_repository::config::CommitAutoRollback::fmt
git_repository::config::Source::fmt
git_repository::config::File::fmt
git_repository::config::Error::fmt
git_repository::config::checkout_options::Error::fmt
git_repository::config::color::Name::fmt
git_repository::config::color::Attribute::fmt
git_repository::config::credential_helpers::Error::fmt
git_repository::config::diff::algorithm::Error::fmt
git_repository::config::file::MultiValueMut::fmt
git_repository::config::file::SectionMut::fmt
git_repository::config::file::ValueMut::fmt
git_repository::config::file::Metadata::fmt
git_repository::config::file::Section::fmt
git_repository::config::file::SectionId::fmt
git_repository::config::file::includes::Error::fmt
git_repository::config::file::init::Error::fmt
git_repository::config::file::init::from_env::Error::fmt
git_repository::config::file::init::from_paths::Error::fmt
git_repository::config::file::rename_section::Error::fmt
git_repository::config::file::section::Body::fmt
git_repository::config::file::set_raw_value::Error::fmt
git_repository::config::integer::Suffix::fmt
git_repository::config::lookup::Error::fmt
git_repository::config::lookup::existing::Error::fmt
git_repository::config::overrides::Error::fmt
git_repository::config::parse::Events::fmt
git_repository::config::parse::Key::fmt
git_repository::config::parse::Event::fmt
git_repository::config::parse::Section::fmt
git_repository::config::parse::Comment::fmt
git_repository::config::parse::Error::fmt
git_repository::config::parse::section::Header::fmt
git_repository::config::parse::section::Name::fmt
git_repository::config::parse::section::Key::fmt
git_repository::config::parse::section::header::Error::fmt
git_repository::config::parse::section::key::Error::fmt
git_repository::config::parse::section::name::Error::fmt
git_repository::config::path::interpolate::Error::fmt
git_repository::config::source::Kind::fmt
git_repository::config::value::Error::fmt
git_repository::create::Error::fmt
git_repository::create::Kind::fmt
git_repository::discover::Error::fmt
git_repository::discover::is_git::Error::fmt
git_repository::discover::parse::gitdir::Error::fmt
git_repository::discover::path::from_gitdir_file::Error::fmt
git_repository::discover::repository::Path::fmt
git_repository::discover::repository::Kind::fmt
git_repository::discover::upwards::Error::fmt
git_repository::head::peel::Error::fmt
git_repository::head::peel::to_commit::Error::fmt
git_repository::index::Version::fmt
git_repository::index::Entry::fmt
git_repository::index::File::fmt
git_repository::index::decode::Error::fmt
git_repository::index::decode::header::Error::fmt
git_repository::index::entry::Mode::fmt
git_repository::index::entry::Flags::fmt
git_repository::index::entry::Time::fmt
git_repository::index::entry::Stat::fmt
git_repository::index::extension::Tree::fmt
git_repository::index::extension::link::decode::Error::fmt
git_repository::index::extension::tree::verify::Error::fmt
git_repository::index::file::init::Error::fmt
git_repository::index::file::verify::Error::fmt
git_repository::index::file::write::Error::fmt
git_repository::index::verify::entries::Error::fmt
git_repository::index::verify::extensions::Error::fmt
git_repository::index::write::Extensions::fmt
git_repository::index::write::Options::fmt
git_repository::init::Error::fmt
git_repository::mailmap::Entry::fmt
git_repository::mailmap::load::Error::fmt
git_repository::mailmap::parse::Error::fmt
git_repository::mailmap::snapshot::Signature::fmt
git_repository::object::Kind::fmt
git_repository::object::commit::Error::fmt
git_repository::object::conversion::Error::fmt
git_repository::object::peel::to_kind::Error::fmt
git_repository::object::tree::EntryRef::fmt
git_repository::object::tree::Entry::fmt
git_repository::object::tree::diff::Change::fmt
git_repository::object::tree::diff::change::Event::fmt
git_repository::object::tree::diff::change::event::diff::Error::fmt
git_repository::object::tree::diff::for_each::Error::fmt
git_repository::object::try_into::Error::fmt
git_repository::open::ReplacementObjects::fmt
git_repository::open::Error::fmt
git_repository::path::Spec::fmt
git_repository::path::Utf8Error::fmt
git_repository::path::realpath::Error::fmt
git_repository::permissions::Config::fmt
git_repository::permissions::Environment::fmt
git_repository::progress::Unit::fmt
git_repository::progress::MessageLevel::fmt
git_repository::progress::unit::Bytes::fmt
git_repository::progress::unit::Human::fmt
git_repository::progress::unit::Range::fmt
git_repository::progress::unit::Kind::fmt
git_repository::progress::unit::display::UnitDisplay::fmt
git_repository::progress::unit::display::Location::fmt
git_repository::progress::unit::display::Throughput::fmt
git_repository::progress::unit::display::Mode::fmt
git_repository::progress::unit::human::Formatter::fmt
git_repository::progress::unit::human::Scales::fmt
git_repository::reference::Kind::fmt
git_repository::reference::Category::fmt
git_repository::Url::eq
git_repository::config::color::Name::eq
git_repository::config::parse::section::Name::eq
git_repository::index::entry::Time::eq
git_repository::index::entry::Stat::eq
git_repository::reference::remote::Name::eq
git_repository::Head::id
Returns the id the head points to, which isn’t possible …
git_repository::Url::cmp
git_repository::config::color::Name::cmp
git_repository::config::parse::section::Name::cmp
git_repository::index::entry::Time::cmp
git_repository::index::entry::Stat::cmp
git_repository::Url::fmt
git_repository::config::color::Name::fmt
git_repository::config::parse::section::Name::fmt
git_repository::index::entry::Time::fmt
git_repository::index::entry::Stat::fmt
git_repository::progress::unit::Human::fmt
git_repository::reference::remote::Name::fmt
git_repository::config::parse::key
Parse input like core.bare or remote.origin.url as a Key …
git_repository::config::value::Error::new
Create a new value error from message, with input being …
git_repository::progress::unit::Human::new
A convenience method to create a new new instance and its …
git_repository::progress::unit::Range::new
A convenience method to create a new instance of name.
git_repository::config::color::Attribute::set
Inserts or removes the specified flags depending on the …
git_repository::index::entry::Mode::set
Inserts or removes the specified flags depending on the …
git_repository::index::entry::Flags::set
Inserts or removes the specified flags depending on the …
git_repository::Tag::drop
git_repository::ObjectDetached::from
git_repository::progress::Unit::from
git_repository::Url::hash
git_repository::config::color::Name::hash
git_repository::config::parse::section::Name::hash
git_repository::index::entry::Time::hash
git_repository::index::entry::Stat::hash
git_repository::Url::host
Returns the host mentioned in the url, if present.
git_repository::Head::name
Returns the name of this references, always HEAD.
git_repository::index::extension::Iter::next
git_repository::interrupt::Iter::next
git_repository::reference::iter::Iter::next
git_repository::worktree::fs::stack::Delegate::push
Called after any component was pushed, with the path …
git_repository::Url::user
Returns the user mentioned in the url, if present.
git_repository::Url::clone
git_repository::Head::clone
git_repository::config::color::Name::clone
git_repository::config::parse::section::Name::clone
git_repository::index::entry::Time::clone
git_repository::index::entry::Stat::clone
git_repository::reference::remote::Name::clone
git_repository::progress::count
A unit for displaying human readable numbers with …
git_repository::config::parse::section::Name::deref
git_repository::interrupt::Iter::inner
Return the inner iterator as reference
git_repository::progress::unit::label
Returns a unit that is a static label.
git_repository::progress::unit::human::Formatter::parse
Parse a string back into a float value.
git_repository::config::File::value
Returns an interpreted value given a section, an optional …
git_repository::config::parse::section::Name::as_ref
git_repository::reference::remote::Name::as_ref
git_repository::reference::remote::Name::as_url
Return this instance as url, if it is one.
git_repository::Head::peeled
Peel this instance to make obtaining its final target id …
git_repository::reference::iter::Iter::peeled
Automatically peel references before yielding them during …
git_repository::config::Snapshot::string
Return the string at key, or None if there is no such …
git_repository::Tag::tagger
Decode this tag partially and return the tagger, if the …
git_repository::config::File::values
Returns all interpreted values given a section, an …
git_repository::index::extension::Tree::verify
git_repository::reference::remote::Name::as_bstr
Obtain the name as string representation.
git_repository::config::Snapshot::boolean
Return the boolean at key, or None if there is no such …
git_repository::config::Snapshot::integer
Return the resolved integer at key, or None if there is no …
git_repository::reference::log::message
Generate a message typical for git commit logs based on …
git_repository::config::parse::Events::from_str
Attempt to zero-copy parse the provided input string.
git_repository::ObjectId::from_str
git_repository::config::File::from_str
git_repository::config::color::Name::from_str
git_repository::config::color::Attribute::from_str
git_repository::config::integer::Suffix::from_str
git_repository::Head::log_iter
Return a platform for obtaining iterators on the reference …
git_repository::Url::set_user
Set the given user, with None unsetting it. Returns the …
git_repository::config::parse::section::Name::to_owned
Turn this instance into a fully owned one with 'static …
git_repository::config::File::try_from
Convenience constructor. Attempts to parse the provided …
git_repository::Url::try_from
git_repository::config::parse::Events::try_from
git_repository::config::parse::section::Name::try_from
git_repository::config::parse::section::Key::try_from
git_repository::Url::write_to
Write this URL losslessly to out, ready to be parsed again.
git_repository::reference::remote::Name::as_symbol
Return this instance as a symbolic name, if it is one.
git_repository::Head::is_unborn
Returns true if this instance is not yet born, hence it …
git_repository::index::entry::Time::serialize
git_repository::index::entry::Stat::serialize
git_repository::Tag::target_id
Decode this tag partially and return the id of its target.
git_repository::config::File::try_value
Like value(), but returning an None if the value wasn’t …
git_repository::interrupt::Iter::into_inner
Return the inner iterator
git_repository::Url::to_bstring
Transform ourselves into a binary string, losslessly, or …
git_repository::progress::unit::human::Formatter::with_units
Sets the units value.
git_repository::Repository::find_remote
Find the remote with the given name or report an error, …
git_repository::Head::into_remote
Return the remote with which the currently checked our …
git_repository::Head::is_detached
Returns true if this instance is detached, and points to …
git_repository::Url::partial_cmp
git_repository::config::color::Name::partial_cmp
git_repository::config::parse::section::Name::partial_cmp
git_repository::index::entry::Time::partial_cmp
git_repository::index::entry::Stat::partial_cmp
git_repository::config::Snapshot::try_boolean
Like boolean(), but it will report an error if the value …
git_repository::config::Snapshot::try_integer
Like integer(), but it will report an error if the value …
git_repository::progress::unit::human::Formatter::with_suffix
Sets the expected suffix value.
git_repository::Url::canonicalize
Turn a file url like file://relative into …
git_repository::progress::unit::Human::display_unit
git_repository::worktree::fs::cache::State::for_checkout
Configure a state to be suitable for checking out files.
git_repository::open::Options::lossy_config
By default, in release mode configuration will be read …
git_repository::Url::path_is_root
Returns true if the path portion of the url is /.
git_repository::config::Snapshot::trusted_path
Return the trusted and fully interpolated path at key, or …
git_repository::remote::fetch::Prepare::with_dry_run
If dry run is enabled, no change to the repository will be …
git_repository::Url::canonicalized
Turn a file url like file://relative into …
git_repository::config::path::interpolate::home_for_user
Obtain the home directory for the given user name or …
git_repository::config::File::raw_value_mut
Returns a mutable reference to an uninterpreted value …
git_repository::Head::referent_name
Returns the full reference name of this head if it is not …
git_repository::open::Options::strict_config
If set, default is false, invalid configuration values …
git_repository::commit::describe::Platform::id_as_fallback
If true, even if no candidate is available a format will …
git_repository::progress::unit::label_and_mode
Returns a unit that is a static label along with …
git_repository::config::File::raw_values_mut
Returns mutable references to all uninterpreted values …
git_repository::config::File::remove_section
Removes the section with name and subsection_name , …
git_repository::progress::unit::human::Formatter::with_separator
Sets the separator value for formatting the string.
git_repository::Url::port_or_default
Returns the actual or default port for use according to …
git_repository::Repository::try_find_remote
Find the remote with the given name or return None if it …
git_repository::config::File::sections_by_name
Gets all sections that match the provided name, ignoring …
git_repository::open::Options::bail_if_untrusted
If true, default false, and if the repository’s trust …
git_repository::Repository::branch_remote_ref
Returns the validated reference on the remote associated …
git_repository::Head::try_into_referent
Try to transform this instance into the symbolic reference …
git_repository::index::State::verify_extensions
Note: find cannot be Option<F> as we can’t call it with …
git_repository::Repository::branch_remote_name
Returns the unvalidated name of the remote associated with …
git_repository::config::Snapshot::credential_helpers
Returns the configuration for all git-credential helpers …
git_repository::progress::unit::Human::display_upper_bound
git_repository::Head::peel_to_id_in_place
Follow the symbolic reference of this head until its …
git_repository::worktree::fs::Cache::unlink_on_collision
git_repository::Head::into_fully_peeled_id
Consume this instance and transform it into the final …
git_repository::config::File::raw_value_mut_filter
Returns a mutable reference to an uninterpreted value …
git_repository::config::file::SectionMut::set_implicit_newline
Enables or disables automatically adding newline events …
git_repository::progress::unit::Human::display_current_value
git_repository::config::File::raw_values_mut_filter
Returns mutable references to all uninterpreted values …
git_repository::config::File::remove_section_filter
Removes the section with name and subsection_name that …
git_repository::commit::describe::Platform::traverse_first_parent
If true, shorten the graph traversal time by just …
git_repository::remote::Connection::configured_credentials
A utility to return a function that will use this …
git_repository::config::File::from_paths_metadata_buf
Like from_paths_metadata(), but will use buf to …
git_repository::Head::peel_to_commit_in_place
Follow the symbolic reference of this head until its …
git_repository::config::File::sections_and_ids_by_name
Similar to sections_by_name(), but returns an identifier …
git_repository::Url::serialize_alternate_form
Enable alternate serialization for this url, e.g. …
git_repository::Head::prior_checked_out_branches
Return a list of all branch names that were previously …
git_repository::config::File::sections_by_name_and_filter
Gets all sections that match the provided name, ignoring …
git_repository::Repository::try_find_remote_without_url_rewrite
Similar to try_find_remote(), but removes a failure mode …
git_repository::oid::eq
git_repository::Url::eq
git_repository::Repository::eq
git_repository::ObjectId::eq
git_repository::ThreadSafeRepository::eq
git_repository::Kind::eq
git_repository::Id::eq
git_repository::Remote::eq
git_repository::commit::describe::SelectRef::eq
git_repository::config::Color::eq
git_repository::config::Integer::eq
git_repository::config::Boolean::eq
git_repository::config::Path::eq
git_repository::config::Source::eq
git_repository::config::File::eq
git_repository::config::color::Name::eq
git_repository::config::color::Attribute::eq
git_repository::config::file::MultiValueMut::eq
git_repository::config::file::SectionMut::eq
git_repository::config::file::ValueMut::eq
git_repository::config::file::Metadata::eq
git_repository::config::file::Section::eq
git_repository::config::file::SectionId::eq
git_repository::config::file::section::Body::eq
git_repository::config::integer::Suffix::eq
git_repository::config::parse::Events::eq
git_repository::config::parse::Key::eq
git_repository::config::parse::Event::eq
git_repository::config::parse::Section::eq
git_repository::config::parse::Comment::eq
git_repository::config::parse::Error::eq
git_repository::config::parse::section::Header::eq
git_repository::config::parse::section::Name::eq
git_repository::config::parse::section::Key::eq
git_repository::config::parse::section::header::Error::eq
git_repository::config::source::Kind::eq
git_repository::config::value::Error::eq
git_repository::discover::repository::Path::eq
git_repository::discover::repository::Kind::eq
git_repository::index::Version::eq
git_repository::index::Entry::eq
git_repository::index::entry::Mode::eq
git_repository::index::entry::Flags::eq
git_repository::index::entry::Time::eq
git_repository::index::entry::Stat::eq
git_repository::index::extension::Tree::eq
git_repository::mailmap::Entry::eq
git_repository::mailmap::snapshot::Signature::eq
git_repository::object::Kind::eq
git_repository::object::tree::Entry::eq
git_repository::object::tree::diff::Action::eq
git_repository::permissions::Config::eq
git_repository::progress::MessageLevel::eq
git_repository::progress::unit::Bytes::eq
git_repository::progress::unit::Range::eq
git_repository::progress::unit::display::Location::eq
git_repository::progress::unit::display::Throughput::eq
git_repository::progress::unit::display::Mode::eq
git_repository::reference::Kind::eq
git_repository::reference::Category::eq
git_repository::reference::remote::Name::eq
git_repository::remote::Direction::eq
git_repository::remote::fetch::refs::Update::eq
git_repository::remote::fetch::refs::update::Mode::eq
git_repository::revision::Spec::eq
git_repository::revision::spec::parse::RefsHint::eq
git_repository::revision::spec::parse::ObjectKindHint::eq
git_repository::state::InProgress::eq
git_repository::worktree::fs::Capabilities::eq
git_repository::worktree::index::checkout::Collision::eq
git_repository::index::extension::Iter::new
Create a new extension iterator at the entrypoint for …
git_repository::interrupt::Iter::new
Create a new iterator over inner which checks for …
git_repository::progress::unit::Human::new
A convenience method to create a new new instance and its …
git_repository::Url::clone
git_repository::Head::clone
git_repository::config::color::Name::clone
git_repository::config::parse::section::Name::clone
git_repository::index::entry::Time::clone
git_repository::index::entry::Stat::clone
git_repository::reference::remote::Name::clone
git_repository::config::parse::section::Name::as_ref
git_repository::config::parse::section::Key::as_ref
git_repository::remote::Direction::as_str
Return ourselves as string suitable for use as verb in an …
git_repository::head::Kind::attach
Attach this instance to a repo to produce a Head.
git_repository::config::color::Attribute::is_all
Returns true if all flags are currently set.
git_repository::index::entry::Mode::is_all
Returns true if all flags are currently set.
git_repository::index::entry::Flags::is_all
Returns true if all flags are currently set.
git_repository::reference::iter::Iter::peeled
Automatically peel references before yielding them during …
git_repository::Url::default
git_repository::config::parse::section::Name::default
git_repository::index::entry::Time::default
git_repository::index::entry::Stat::default
git_repository::discover::is_bare
Returns true if the given git_dir seems to be a bare …
git_repository::Repository::is_bare
Return true if this repository is bare, and has no main …
git_repository::Kind::is_bare
Returns true if this is a bare repository, one without a …
git_repository::discover::repository::Kind::is_bare
Returns true if this is a bare repository, one without a …
git_repository::Worktree::is_main
Return true if this worktree is the main worktree …
git_repository::ObjectId::is_null
Returns true if this hash consists of all null bytes
git_repository::config::Boolean::is_true
Return true if the boolean is a true value.
git_repository::config::File::is_void
Returns if there are no entries in the config. This will …
git_repository::config::file::section::Body::is_void
Returns if the section is empty. Note that this may count …
git_repository::prelude::Find::contains
Returns true if the object exists in the database.
git_repository::config::color::Attribute::contains
Returns true if all of the flags in other are contained …
git_repository::index::entry::Mode::contains
Returns true if all of the flags in other are contained …
git_repository::index::entry::Flags::contains
Returns true if all of the flags in other are contained …
git_repository::config::color::Attribute::is_empty
Returns true if no flags are currently stored.
git_repository::config::file::MultiValueMut::is_empty
Returns true if the multivar does not have any values. …
git_repository::index::entry::Mode::is_empty
Returns true if no flags are currently stored.
git_repository::index::entry::Flags::is_empty
Returns true if no flags are currently stored.
git_repository::config::parse::section::Name::to_owned
Turn this instance into a fully owned one with 'static …
git_repository::config::parse::section::Header::is_legacy
Return true if this is a header like [legacy.subsection], …
git_repository::Worktree::is_locked
Return true if this worktree cannot be pruned, moved or …
git_repository::worktree::Proxy::is_locked
Return true if the worktree cannot be pruned, moved or …
git_repository::index::State::is_sparse
Returns a boolean value indicating whether the index is …
git_repository::index::entry::Mode::is_sparse
Return true if this is a sparse entry, as it points to a …
git_repository::Head::is_unborn
Returns true if this instance is not yet born, hence it …
git_repository::config::color::Attribute::intersects
Returns true if there are flags common to both self and …
git_repository::index::entry::Mode::intersects
Returns true if there are flags common to both self and …
git_repository::index::entry::Flags::intersects
Returns true if there are flags common to both self and …
git_repository::path::is_absolute
return true if path is absolute, which depends on the …
git_repository::Head::is_detached
Returns true if this instance is detached, and points to …
git_repository::worktree::fs::cache::Platform::is_excluded
See if the currently set entry is excluded as per exclude …
git_repository::config::file::section::Body::contains_key
Returns true if the section containss the provided key.
git_repository::interrupt::is_triggered
Returns true if an interrupt is requested.
git_repository::Url::path_is_root
Returns true if the path portion of the url is /.
git_repository::config::parse::section::header::is_valid_subsection
Return true if name is valid as subsection name, like …
git_repository::reference::Category::is_worktree_private
Returns true if the category is private to their …
git_repository::discover::is_submodule_git_dir
Returns true if git_dir is is located within a .git/modules…
git_repository::Url::serialize_alternate_form
Enable alternate serialization for this url, e.g. …