pub async fn fix_files(
root_commits: Vec<CommitId>,
matcher: &dyn Matcher,
include_unchanged_files: bool,
repo_mut: &mut MutableRepo,
file_fixer: &mut impl FileFixer,
) -> Result<FixSummary, FixError>
Expand description
Updates files with formatting fixes or other changes, using the given FileFixer.
The primary use case is to apply the results of automatic code formatting
tools to revisions that may not be properly formatted yet. It can also be
used to modify files with other tools like sed
or sort
.
After the FileFixer is done, descendants are also updated, which ensures that the fixes are not lost. This will never result in new conflicts. Files with existing conflicts are updated on all sides of the conflict, which can potentially increase or decrease the number of conflict markers.