pub enum SubmoduleMode {
Disabled,
Enabled,
}Expand description
Controls whether .gitmodules-declared submodules are initialized and
updated after a clone.
Replaces the previous plain update_submodules: bool field — folding
submodule handling into a named mode makes the untrusted clamp in
CloneTrust::Untrusted a single, unambiguous source of truth instead of
a bool the caller could independently flip back on.
Variants§
Disabled
Never initialize or update submodules, even if the repository
declares them via .gitmodules. Secure default — matches the
pre-#1430 behavior, where submodule initialization was never wired
into crate::manager::GitManager::clone_repository at all.
Enabled
Initialize and update submodules after clone (equivalent to
git clone --recurse-submodules). Only appropriate for trusted,
first-party repositories, since a submodule’s remote URL is taken
verbatim from the repository’s own .gitmodules content.
Trait Implementations§
Source§impl Clone for SubmoduleMode
impl Clone for SubmoduleMode
Source§fn clone(&self) -> SubmoduleMode
fn clone(&self) -> SubmoduleMode
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 SubmoduleMode
impl Debug for SubmoduleMode
Source§impl Default for SubmoduleMode
impl Default for SubmoduleMode
Source§fn default() -> SubmoduleMode
fn default() -> SubmoduleMode
Source§impl PartialEq for SubmoduleMode
impl PartialEq for SubmoduleMode
Source§fn eq(&self, other: &SubmoduleMode) -> bool
fn eq(&self, other: &SubmoduleMode) -> bool
self and other values to be equal, and is used by ==.impl Copy for SubmoduleMode
impl Eq for SubmoduleMode
impl StructuralPartialEq for SubmoduleMode
Auto Trait Implementations§
impl Freeze for SubmoduleMode
impl RefUnwindSafe for SubmoduleMode
impl Send for SubmoduleMode
impl Sync for SubmoduleMode
impl Unpin for SubmoduleMode
impl UnsafeUnpin for SubmoduleMode
impl UnwindSafe for SubmoduleMode
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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