diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-06 13:23:46 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-06 13:23:46 +0900 |
| commit | 9d7983455c051185f44a507c2f4e9b8a33f1799d (patch) | |
| tree | ac58517b30b41f5f790dfe5c564ae74544569fa2 /crates/shirabe/src/downloader/vcs_downloader.rs | |
| parent | 4bf226dd30743505707d2ad4e322d49d4258dae0 (diff) | |
| download | php-shirabe-9d7983455c051185f44a507c2f4e9b8a33f1799d.tar.gz php-shirabe-9d7983455c051185f44a507c2f4e9b8a33f1799d.tar.zst php-shirabe-9d7983455c051185f44a507c2f4e9b8a33f1799d.zip | |
fix(vcs-downloader): abort on local changes in parent cleanChanges path
The VcsDownloaderBase::clean_changes stub returned Ok(None), silently
swallowing the abort that PHP's parent::cleanChanges() raises when the
working copy has uncommitted changes. Drop the stub and give Git/Svn a
private fail_on_local_changes helper that performs the getLocalChanges
check and throws, matching the default VcsDownloader::clean_changes().
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/downloader/vcs_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/vcs_downloader.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/crates/shirabe/src/downloader/vcs_downloader.rs b/crates/shirabe/src/downloader/vcs_downloader.rs index 0637f08..a967c3b 100644 --- a/crates/shirabe/src/downloader/vcs_downloader.rs +++ b/crates/shirabe/src/downloader/vcs_downloader.rs @@ -55,21 +55,6 @@ impl VcsDownloaderBase { } } - /// Equivalent of PHP `parent::cleanChanges()`. Subclasses that override the trait method - /// call this when they need to invoke the base behavior. Since this lives on the data struct, - /// it cannot consult subclass-specific `get_local_changes`; it assumes any callers have - /// already verified that no local changes exist. - pub async fn clean_changes( - &self, - _package: PackageInterfaceHandle, - _path: &str, - _update: bool, - ) -> Result<Option<PhpMixed>> { - // TODO(phase-b): parent::cleanChanges() rechecks getLocalChanges via dynamic dispatch. - // Callers in subclasses must do that check themselves (they already have). - Ok(None) - } - pub fn get_vcs_reference(&self, package: PackageInterfaceHandle, path: &str) -> Option<String> { let parser = VersionParser::new(); let mut guesser = VersionGuesser::new( |
