pub struct RenameConfig {
pub similarity_threshold: f64,
pub max_file_bytes: usize,
pub max_candidates: usize,
}Expand description
Configuration for rename detection heuristics
Fields§
§similarity_threshold: f64Minimum similarity ratio (0.0-1.0) for detect_renames_by_content
to pair a delete+add as a rename. Exact blob-hash matches are always
detected by Manifest::diff_with_renames regardless of this value.
max_file_bytes: usizePer-file size cap (bytes) for content-similarity comparison. Files larger than this on either side of a pair are skipped — rename detection only fires when both contents fit in memory. Default: 1 MiB.
max_candidates: usizeMaximum number of (delete + add) candidates to consider in
detect_renames_by_content. Past this, the pass bails out without
running similarity scoring — this prevents the O(D*A) pair scan from
pathologically slowing huge refactor commits. Default: 1000.
Trait Implementations§
Source§impl Clone for RenameConfig
impl Clone for RenameConfig
Source§impl Debug for RenameConfig
impl Debug for RenameConfig
Auto Trait Implementations§
impl Forget for RenameConfig
impl Freeze for RenameConfig
impl Move for RenameConfig
impl RefUnwindSafe for RenameConfig
impl Send for RenameConfig
impl Sync for RenameConfig
impl Unpin for RenameConfig
impl UnsafeUnpin for RenameConfig
impl UnwindSafe for RenameConfig
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<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> ⓘ
Converts
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> ⓘ
Converts
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