diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-03 23:42:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-03 23:42:06 +0900 |
| commit | 8181f57ec3428195ac822590257cb3c135e25b5d (patch) | |
| tree | 004830f8f26fc166b6c518aa4cedbed0855dbdef /crates/shirabe/src/command/status_command.rs | |
| parent | dd19bda86582e9f6a4ba1879112d9ab3ba8432f6 (diff) | |
| download | php-shirabe-8181f57ec3428195ac822590257cb3c135e25b5d.tar.gz php-shirabe-8181f57ec3428195ac822590257cb3c135e25b5d.tar.zst php-shirabe-8181f57ec3428195ac822590257cb3c135e25b5d.zip | |
feat(downloader): return Result from getUnpushedChanges to bubble RuntimeException
Match PHP GitDownloader::getUnpushedChanges, which returns ?string while
throwing \RuntimeException on git command failure. Change the signature to
Result<Option<String>> and replace the three panic\!() sites with
Err(RuntimeException), mirroring the get_local_changes port. Thread ? through
the clean_changes and StatusCommand call sites.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/status_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/status_command.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/status_command.rs b/crates/shirabe/src/command/status_command.rs index dba4cc8..01c1b5e 100644 --- a/crates/shirabe/src/command/status_command.rs +++ b/crates/shirabe/src/command/status_command.rs @@ -199,7 +199,7 @@ impl StatusCommand { if let Some(dvcs_downloader) = downloader.as_dvcs_downloader_interface() { if let Some(unpushed) = - dvcs_downloader.get_unpushed_changes(package.clone(), target_dir.clone()) + dvcs_downloader.get_unpushed_changes(package.clone(), target_dir.clone())? { unpushed_changes.insert(target_dir, unpushed); } |
