#[non_exhaustive]pub enum BreakRewrites {
Off,
Score(u64),
}Expand description
Break-rewrite policy (Git -B): split a heavily rewritten modification into a deletion and an
addition so rename and copy detection can pair its halves.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Off
Never break modifications.
Score(u64)
Break a modification whose rewritten share reaches this score, on Git’s internal scale
from 0 to BreakRewrites::MAX_SCORE.
Implementations§
Source§impl BreakRewrites
impl BreakRewrites
Sourcepub const MAX_SCORE: u64 = GIT_DIFF_MAX_SCORE
pub const MAX_SCORE: u64 = GIT_DIFF_MAX_SCORE
Top of the score scale Self::Score uses (100% rewritten).
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
Git’s default for a bare -B (50% of Self::MAX_SCORE).
Sourcepub fn percent(percent: u8) -> Self
pub fn percent(percent: u8) -> Self
Break at percent of Self::MAX_SCORE (Git -B<n>%); values above 100 saturate.
Trait Implementations§
Source§impl Clone for BreakRewrites
impl Clone for BreakRewrites
impl Copy for BreakRewrites
Source§impl Debug for BreakRewrites
impl Debug for BreakRewrites
Source§impl Default for BreakRewrites
impl Default for BreakRewrites
impl Eq for BreakRewrites
Source§impl PartialEq for BreakRewrites
impl PartialEq for BreakRewrites
impl StructuralPartialEq for BreakRewrites
Auto Trait Implementations§
impl Forget for BreakRewrites
impl Freeze for BreakRewrites
impl RefUnwindSafe for BreakRewrites
impl Send for BreakRewrites
impl Sync for BreakRewrites
impl Unpin for BreakRewrites
impl UnsafeUnpin for BreakRewrites
impl UnwindSafe for BreakRewrites
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,
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§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.