Skip to main content

CloneOutcome

Struct CloneOutcome 

Source
pub struct CloneOutcome {
Show 19 fields pub url: String, pub path: PathBuf, pub head: CloneHead, pub checkout_oid: ObjectId, pub checkout: CloneCheckout, pub branches_with_commits: Vec<String>, pub repo: Repository, pub transfer: TransferStats, pub branches: u64, pub tags: u64, pub files: u64, pub worktree_bytes: u64, pub path_collisions: Vec<String>, pub submodule_paths: Vec<String>, pub bare: bool, pub bundle: BundleSeed, pub filter_sent: bool, pub promisor: Option<PromisorHandshake>, pub filter: Option<ObjectFilterSpec>,
}
Expand description

Result of a successful clone.

Fields§

§url: String

Source URL string from the options.

§path: PathBuf

Destination path.

§head: CloneHead

Branch checked out, or detached tag checkout.

§checkout_oid: ObjectId

Commit to check out on that branch.

ObjectId::zero() when the remote default branch has no commits yet.

§checkout: CloneCheckout

Checkout disposition after fetch and default-branch setup.

§branches_with_commits: Vec<String>

Remote-tracking branch names that resolved to a commit (empty unless checkout is CloneCheckout::UnbornDefaultBranch).

§repo: Repository

Open handle to the new repository.

§transfer: TransferStats

Objects and pack bytes received during the initial fetch.

§branches: u64

Remote branches fetched (from the fetch ref updates).

§tags: u64

Remote tags fetched (from the fetch ref updates).

§files: u64

Working-tree files checked out (zero when checkout was skipped or not applicable).

§worktree_bytes: u64

Total size of checked-out files in bytes.

§path_collisions: Vec<String>

Index paths that collided on a case-insensitive filesystem during checkout.

§submodule_paths: Vec<String>

Gitlink paths materialized during checkout (submodules grit does not fetch).

§bare: bool

Whether the destination is a bare repository.

§bundle: BundleSeed

Whether a bundle from the server’s bundle-uri seeded the clone. Self::transfer includes what the bundle brought.

§filter_sent: bool

True when the initial fetch sent an object filter and the server applied it. False while Self::filter is set means the server does not support filter, so every object came; the clone is still configured as a partial clone, as Git leaves it (see Self::filter_ignored).

§promisor: Option<PromisorHandshake>

The promisor-remote exchange of the initial fetch, when the server advertised promisor remotes.

§filter: Option<ObjectFilterSpec>

The filter the initial fetch used: CloneOptions::filter, or what CloneOptions::auto_filter resolved to.

Implementations§

Source§

impl CloneOutcome

Source

pub fn filter_ignored(&self) -> bool

Whether a filter was requested but the server does not support filter.

§Returns

true when Self::filter is set but was not sent (Self::filter_sent is false), so the server sent every object; the clone is still configured as a partial clone, as Git leaves it.

Trait Implementations§

Source§

impl Debug for CloneOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.