pub struct Renames {
pub copies: Option<Copies>,
pub percentage: Option<f32>,
pub limit: usize,
}
Expand description
A structure to capture how to perform rename tracking
Fields§
§copies: Option<Copies>
If Some(…)
, do 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 as files.
percentage: Option<f32>
The percentage of similarity needed for files to be considered renamed or copied, 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 rename or copy tracking. Defaults to 1000. If 0, there is no limit.
Implementations§
source§impl Renames
impl Renames
sourcepub fn try_from_config(
config: &File<'static>,
lenient: bool
) -> Result<Option<Self>, Error>
pub fn try_from_config( config: &File<'static>, lenient: bool ) -> Result<Option<Self>, Error>
Create an instance by reading all relevant information from the config
uration, while being lenient
or not.
Returns Ok(None)
if nothing is configured.
Note that missing values will be defaulted similar to what git does.