pub fn index_as_worktree_with_renames<'index, T, U, Find, E>(
index: &'index State,
worktree: &Path,
collector: &mut impl VisitEntry<'index, ContentChange = T, SubmoduleStatus = U>,
compare: impl CompareBlobs<Output = T> + Send + Clone,
submodule: impl SubmoduleStatus<Output = U, Error = E> + Send + Clone,
objects: Find,
progress: &mut dyn Progress,
ctx: Context<'_>,
options: Options<'_>,
) -> Result<Outcome, Error>
Available on crate feature
worktree-rewrites
only.Expand description
Similar to index_as_worktree(…)
, except that it will automatically
track renames if enabled, while additionally providing information about untracked files
(or more, depending on the configuration).
index
- used for checking modifications, and also for knowing which files are tracked during the working-dir traversal.
worktree
- The root of the worktree, in a format that respects
core.precomposeUnicode
.
- The root of the worktree, in a format that respects
collector
- A
VisitEntry
implementation that sees the results of this operation.
- A
compare
- An implementation to compare two blobs for equality, used during index modification checks.
submodule
- An implementation to determine the status of a submodule when encountered during index modification checks.
objects
- A way to obtain objects from the git object database.
progress
- A way to send progress information for the index modification checks.
ctx
- Additional information that will be accessed during index modification checks and traversal.
options
- a way to configure both paths of the operation.