From 8181f57ec3428195ac822590257cb3c135e25b5d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 3 Jun 2026 23:42:06 +0900 Subject: 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> 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) --- crates/shirabe/src/command/status_command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/command') 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); } -- cgit v1.3.1