pub fn prune_packed_objects(
objects_dir: &Path,
opts: PrunePackedOptions,
) -> Result<Vec<PathBuf>>Expand description
Remove loose objects that are already stored in a pack file.
For each loose object under objects_dir whose crate::objects::ObjectId appears in
at least one local pack index, or in a non-promisor pack in an alternate object
directory, the file is deleted (or, with PrunePackedOptions::dry_run, paths are
listed in the return value only). A duplicate loose object is kept when the alternate
holds the same id only as loose, matching Git.
Empty two-char prefix directories are removed afterwards.
Returns the list of paths that were (or would be) removed.
ยงErrors
crate::error::Error::Iofor directory or file access failures.