Struct embuild::git::CloneOptions[][src]

pub struct CloneOptions {
    pub force_ref: Option<Ref>,
    pub branch_update_action: Option<ResetMode>,
    pub force_clean: bool,
    pub depth: Option<NonZeroU64>,
}

Fields

force_ref: Option<Ref>

Force the working directory to be this specific tag, branch or commit.

On a missmatch between this value and the state of the physical repository, it is deleted and cloned from scratch.

If this option specifies a branch name which maches the current branch of the physical repository and branch_update_action is not None then Repository::clone_ext will try to update the repository with the following commands:

branch_update_action: Option<ResetMode>

The mode that is passed to git reset when the branch is updated. If None the working directory with branch is never updated.

force_clean: bool

If the working directory is not clean and force_clean is true, the git repo will be cloned from scratch.

depth: Option<NonZeroU64>

The depth that should be cloned, if None the full repository is cloned.

Note that this option is ignored when force_ref specifies a commit.

Implementations

Force the working directory to be this specific tag, branch or commit.

On a missmatch between this value and the state of the physical repository, it is deleted and cloned from scratch.

If this option specifies a branch name which maches the current branch of the physical repository and branch_update_action is not None then Repository::clone_ext will try to update the repository with the following commands:

The mode that is passed to git reset when the branch is updated. If None the working directory with branch is never updated.

See force_ref for more info.

If the working directory is not clean and force_clean is true, the git repo will be cloned from scratch.

The depth that should be cloned, if None the full repository is cloned.

depth must be greater than zero or else this method will panic.

Note that this option is ignored when force_ref specifies a commit.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.