pub enum OtherStagedMode {
Stop,
Restage,
}Expand description
How [GitModule::commit] handles staged paths outside the only list.
Only consulted when only is Some(non_empty). When only is None /
empty, commit still stages every change via git add -A and this enum
is ignored.
Variants§
Stop
Fail (state unchanged) when the index carries paths outside only.
The safe default — protects against silently sweeping unrelated work.
Restage
Unstage the other paths, commit only, then re-stage them. The
commit ends up containing exactly the only paths; the pre-existing
staged work stays in the index afterwards.
Trait Implementations§
Source§impl Clone for OtherStagedMode
impl Clone for OtherStagedMode
Source§fn clone(&self) -> OtherStagedMode
fn clone(&self) -> OtherStagedMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OtherStagedMode
Source§impl Debug for OtherStagedMode
impl Debug for OtherStagedMode
Source§impl Default for OtherStagedMode
impl Default for OtherStagedMode
Source§fn default() -> OtherStagedMode
fn default() -> OtherStagedMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OtherStagedMode
impl<'de> Deserialize<'de> for OtherStagedMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OtherStagedMode
Source§impl PartialEq for OtherStagedMode
impl PartialEq for OtherStagedMode
Source§impl Serialize for OtherStagedMode
impl Serialize for OtherStagedMode
impl StructuralPartialEq for OtherStagedMode
Auto Trait Implementations§
impl Freeze for OtherStagedMode
impl RefUnwindSafe for OtherStagedMode
impl Send for OtherStagedMode
impl Sync for OtherStagedMode
impl Unpin for OtherStagedMode
impl UnsafeUnpin for OtherStagedMode
impl UnwindSafe for OtherStagedMode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.