pub struct CreateOptions {
pub branch: String,
pub base: Option<String>,
pub track: Option<String>,
pub copy_from: Option<String>,
pub init_submodules: bool,
pub seed_submodules: bool,
pub reflink: bool,
pub no_hooks: bool,
}Expand description
Options for Workspace::create.
Fields§
§branch: StringThe branch to check out, created off base when it does not exist.
base: Option<String>Explicit base ref for a new branch. None resolves the configured
default_base, then the repository default branch, then HEAD.
Ignored when the branch already exists.
track: Option<String>Set this ref as the new branch’s upstream (--track).
copy_from: Option<String>Copy-source worktree query (spec §8); None copies from the current
worktree (or the primary root).
init_submodules: boolInitialize uninitialized submodules after creation. The service never
prompts: callers resolve their submodules.init policy (and any flag
override) to a boolean first.
seed_submodules: boolSeed those submodules from the repository’s own local object stores
rather than re-cloning them from their remotes. Only an accelerator: the
stock submodule update --init --recursive still runs afterwards and
determines the result, so this cannot change the outcome. Resolved by the
caller from submodules.seed. Ignored when init_submodules is false.
reflink: boolMaterialize the worktree by copy-on-write cloning an existing one’s files
rather than checking them out. Requires a CoW filesystem and a source
worktree already at the same tree; when either is missing this silently
uses the normal checkout. Resolved by the caller from create.reflink.
no_hooks: boolSkip the post_create hook.
Trait Implementations§
Source§impl Clone for CreateOptions
impl Clone for CreateOptions
Source§fn clone(&self) -> CreateOptions
fn clone(&self) -> CreateOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateOptions
impl Debug for CreateOptions
Source§impl Default for CreateOptions
impl Default for CreateOptions
Source§fn default() -> CreateOptions
fn default() -> CreateOptions
Auto Trait Implementations§
impl Freeze for CreateOptions
impl RefUnwindSafe for CreateOptions
impl Send for CreateOptions
impl Sync for CreateOptions
impl Unpin for CreateOptions
impl UnsafeUnpin for CreateOptions
impl UnwindSafe for CreateOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more