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:
git reset HEAD <reset mode>(wherereset modeis the value ofbranch_update_action)git pull --ff-onlyIf these operations fail an error is returned fromRepository::clone_ext.
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: boolIf 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:
git reset HEAD <reset mode>(wherereset modeis the value ofbranch_update_action)git pull --ff-onlyIf these operations fail an error is returned fromRepository::clone_ext.
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.
Trait Implementations
Returns the “default value” for a type. Read more