From 2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 30 Jun 2026 01:23:13 +0900 Subject: refactor(git): replace is_callable with RunCommandOutput trait Model Git::runCommand's mixed $commandOutput parameter with the RunCommandOutput trait (one impl per PHP mode: discard, by-ref capture, callable handler), mirroring ProcessExecutor's IntoExecOutput. This moves the is_callable($commandOutput) value-inspection into the type system and drops the dependency on the shim's incomplete is_callable. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/downloader/git_downloader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/downloader/git_downloader.rs') diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs index 55cf161..cbd429c 100644 --- a/crates/shirabe/src/downloader/git_downloader.rs +++ b/crates/shirabe/src/downloader/git_downloader.rs @@ -974,7 +974,7 @@ impl VcsDownloader for GitDownloader { self.inner.io.write_error3(&msg, true, io_interface::NORMAL); self.git_util - .run_commands(commands, url, Some(&path), true, None)?; + .run_commands(commands, url, Some(&path), true, ())?; let source_url = package.get_source_url(); if Some(url) != source_url.as_deref() && source_url.is_some() { @@ -1092,7 +1092,7 @@ impl VcsDownloader for GitDownloader { ]; self.git_util - .run_commands(commands, url, Some(&path), false, None)?; + .run_commands(commands, url, Some(&path), false, ())?; } let command = vec![ @@ -1104,7 +1104,7 @@ impl VcsDownloader for GitDownloader { "%sanitizedUrl%".to_string(), ]; self.git_util - .run_commands(vec![command], url, Some(&path), false, None)?; + .run_commands(vec![command], url, Some(&path), false, ())?; let pretty_version = target.get_pretty_version(); if let Some(new_ref) = -- cgit v1.3.1