pub struct Options { /* private fields */ }
Expand description
General diff-related options for configuring rename-tracking and blob diffs.
Implementations§
Source§impl Options
Setters
impl Options
Setters
Sourcepub fn no_locations(&mut self) -> &mut Self
pub fn no_locations(&mut self) -> &mut Self
Do not keep track of filepaths at all, which will leave all location
fields empty.
Sourcepub fn track_filename(&mut self) -> &mut Self
pub fn track_filename(&mut self) -> &mut Self
Keep track of file-names, which makes location
fields usable with the filename of the changed item.
Sourcepub fn track_path(&mut self) -> &mut Self
pub fn track_path(&mut self) -> &mut Self
Keep track of the entire path of a change, relative to the repository. (default).
This makes the location
field fully usable.
Sourcepub fn track_rewrites(&mut self, renames: Option<Rewrites>) -> &mut Self
Available on crate feature blob-diff
only.
pub fn track_rewrites(&mut self, renames: Option<Rewrites>) -> &mut Self
blob-diff
only.Provide None
to disable rewrite tracking entirely, or pass Some(<configuration>)
to control to
what extent rename and copy tracking is performed.
Note that by default, the git configuration determines rewrite tracking and git defaults are used if nothing is configured, which turns rename tracking with 50% similarity on, while not tracking copies at all.
Source§impl Options
Builder
impl Options
Builder
Sourcepub fn with_rewrites(self, renames: Option<Rewrites>) -> Self
Available on crate feature blob-diff
only.
pub fn with_rewrites(self, renames: Option<Rewrites>) -> Self
blob-diff
only.Provide None
to disable rewrite tracking entirely, or pass Some(<configuration>)
to control to
what extent rename and copy tracking is performed.
Note that by default, the git configuration determines rewrite tracking and git defaults are used if nothing is configured, which turns rename tracking with 50% similarity on, while not tracking copies at all.