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/tests/util/git_test.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/shirabe/tests') diff --git a/crates/shirabe/tests/util/git_test.rs b/crates/shirabe/tests/util/git_test.rs index 43af80a..991dc91 100644 --- a/crates/shirabe/tests/util/git_test.rs +++ b/crates/shirabe/tests/util/git_test.rs @@ -131,7 +131,7 @@ fn test_run_command_public_git_hub_repository_not_initial_clone_ssh() { "https://github.com/acme/repo", None, true, - None, + (), ) .unwrap(); } @@ -157,7 +157,7 @@ fn test_run_command_public_git_hub_repository_not_initial_clone_https() { "https://github.com/acme/repo", None, true, - None, + (), ) .unwrap(); } @@ -188,7 +188,7 @@ fn test_run_command_private_git_hub_repository_not_initial_clone_not_interactive "https://github.com/acme/repo", None, true, - None, + (), ); let err = result.expect_err("expected a RuntimeException"); @@ -232,7 +232,7 @@ fn run_command_private_github_with_authentication( let mut git = build_git(io, config, process); - git.__run_command(vec![command_callable], git_url, None, true, None) + git.__run_command(vec![command_callable], git_url, None, true, ()) .unwrap(); } @@ -317,7 +317,7 @@ fn run_command_private_bitbucket_with_authentication( let mut git = build_git(io, config, process); - git.__run_command(vec![command_callable], git_url, None, true, None) + git.__run_command(vec![command_callable], git_url, None, true, ()) .unwrap(); } @@ -481,7 +481,7 @@ fn run_command_private_bitbucket_interactive_with_oauth( let mut git = build_git(io, config, process); git.set_http_downloader(downloader); - git.__run_command(vec![command_callable], git_url, None, true, None) + git.__run_command(vec![command_callable], git_url, None, true, ()) .unwrap(); } -- cgit v1.3.1