pub struct Rewrites {
pub copies: Option<Copies>,
pub percentage: Option<f32>,
pub limit: usize,
}
blob
only.Expand description
A structure to capture how to perform rename and copy tracking, used by the rewrites::Tracker.
Fields§
§copies: Option<Copies>
If Some(…)
, also find copies. None
is the default which does not try to detect copies at all.
Note that this is an even more expensive operation than detecting renames stemming from additions and deletions as the resulting set to search through is usually larger.
percentage: Option<f32>
The percentage of similarity needed for files to be considered renamed, defaulting to Some(0.5)
.
This field is similar to git diff -M50%
.
If None
, files are only considered equal if their content matches 100%.
Note that values greater than 1.0 have no different effect than 1.0.
limit: usize
The amount of files to consider for fuzzy rename or copy tracking. Defaults to 1000, meaning that only 1000*1000 combinations can be tested for fuzzy matches, i.e. the ones that try to find matches by comparing similarity. If 0, there is no limit.
If the limit would not be enough to test the entire set of combinations, the algorithm will trade in precision and not run the fuzzy version of identity tests at all. That way results are never partial.
Trait Implementations§
Source§impl Default for Rewrites
impl Default for Rewrites
The default settings for rewrites according to the git configuration defaults.