Skip to main content

CloneIntoOptions

Struct CloneIntoOptions 

Source
pub struct CloneIntoOptions {
Show 14 fields pub url: String, pub remote_name: String, pub environment: Environment, pub initial_branch: String, pub thread_policy: ThreadPolicy, pub depth: Option<u32>, pub filter: Option<ObjectFilterSpec>, pub branch: Option<String>, pub single_branch: Option<bool>, pub tags: Option<CloneTags>, pub promisor_fetcher: Option<Arc<dyn PromisorFetcher>>, pub bare: bool, pub checkout: bool, pub bundle_cache: Option<PathBuf>,
}
Expand description

Options for clone_into: configure a remote and fetch into an already-open repository.

Fields§

§url: String

Source URL or path.

§remote_name: String

Remote name to configure (default DEFAULT_REMOTE).

§environment: Environment

Process environment for config and reflog identity.

§initial_branch: String

Initial branch name when the repository has no commits yet (main).

§thread_policy: ThreadPolicy

Global thread policy for fetch pack ingest.

§depth: Option<u32>

Shallow clone depth.

§filter: Option<ObjectFilterSpec>

Partial-clone filter for the fetch.

§branch: Option<String>

Branch or tag to check out.

§single_branch: Option<bool>

Single-branch fetch mode.

§tags: Option<CloneTags>

Tag fetch mode.

§promisor_fetcher: Option<Arc<dyn PromisorFetcher>>

Promisor fetcher for checkout prefetch.

§bare: bool

Whether this repository is bare (affects ref layout).

§checkout: bool

Populate the working tree after fetch.

§bundle_cache: Option<PathBuf>

Bundle-uri cache directory.

Implementations§

Source§

impl CloneIntoOptions

Source

pub fn new(url: impl Into<String>) -> Self

Options for fetching from url into an existing repository.

Source

pub fn with_environment(self, environment: Environment) -> Self

Replace the process environment used for config and reflog identity.

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.