/// The VCS downloader interface.
///
/// Corresponds to Composer's `VcsDownloader` hierarchy.
pub trait VcsDownloader {
/// Prepare for installation (e.g., sync mirror cache).
fn download(&self, url: &str, reference: &str, target: &std::path::Path) -> anyhow::Result<()>;
/// Install (clone/checkout) the source to the target directory.
fn install(&self, url: &str, reference: &str, target: &std::path::Path) -> anyhow::Result<()>;
/// Update the source at target to a new reference.
fn update(
&self,
url: &str,
old_ref: &str,
new_ref: &str,
target: &std::path::Path,
) -> anyhow::Result<()>;
/// Remove the source from the target directory.
fn remove(&self, target: &std::path::Path) -> anyhow::Result<()>;
/// Detect local changes in the working copy.
/// Returns `None` if clean, `Some(diff)` if modified.
/// Mirrors `Composer\Downloader\ChangeReportInterface::getLocalChanges`.
fn get_local_changes(&self, target: &std::path::Path) -> anyhow::Result