pub enum SubmoduleSeed {
Auto,
Never,
}Expand description
Whether to populate a new worktree’s submodules from the repository’s own
local object stores instead of re-cloning them ([submodules] seed).
A linked worktree does not share .git/modules, so initializing submodules
in one normally re-clones every submodule over the network. Seeding clones
from those existing mirrors instead, which hardlinks the objects.
Seeding never changes the outcome, only the cost: it is always followed by a
stock git submodule update --init --recursive, so anything it skips or gets
wrong is reconciled by git itself. That is why Auto is the default.
Variants§
Auto
Seed from a local mirror whenever one exists (the default).
Never
Never seed; always let git clone submodules from their remotes.
Implementations§
Source§impl SubmoduleSeed
impl SubmoduleSeed
Sourcepub fn parse(value: &str) -> Option<SubmoduleSeed>
pub fn parse(value: &str) -> Option<SubmoduleSeed>
Parses a submodules.seed value (auto, never).
Sourcepub fn is_enabled(self) -> bool
pub fn is_enabled(self) -> bool
Whether seeding is enabled.
Sourcepub fn identifier(self) -> &'static str
pub fn identifier(self) -> &'static str
The config identifier this strategy round-trips through.
Trait Implementations§
Source§impl Clone for SubmoduleSeed
impl Clone for SubmoduleSeed
impl Copy for SubmoduleSeed
Source§impl Debug for SubmoduleSeed
impl Debug for SubmoduleSeed
Source§impl Default for SubmoduleSeed
impl Default for SubmoduleSeed
impl Eq for SubmoduleSeed
Source§impl PartialEq for SubmoduleSeed
impl PartialEq for SubmoduleSeed
impl StructuralPartialEq for SubmoduleSeed
Auto Trait Implementations§
impl Freeze for SubmoduleSeed
impl RefUnwindSafe for SubmoduleSeed
impl Send for SubmoduleSeed
impl Sync for SubmoduleSeed
impl Unpin for SubmoduleSeed
impl UnsafeUnpin for SubmoduleSeed
impl UnwindSafe for SubmoduleSeed
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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