From 0d45c403c20ac8950f2877a21f9cd4f0ca9bf784 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Jun 2026 23:11:03 +0900 Subject: fix(git): run git --version in getVersion The execute call was stubbed out during Phase B, so getVersion never ran git --version and always reported no version. Wire it to ProcessExecutor::execute_args. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/git.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/shirabe/src/util/git.rs') diff --git a/crates/shirabe/src/util/git.rs b/crates/shirabe/src/util/git.rs index 7e9619c..d9cfdfd 100644 --- a/crates/shirabe/src/util/git.rs +++ b/crates/shirabe/src/util/git.rs @@ -159,8 +159,6 @@ impl Git { None }; - // TODO(phase-b): closure captures &mut self.process, &mut last_command, etc. - // Inlined as a helper that returns (status, last_command, output) let cwd_string = cwd.map(|s| s.to_string()); // PHP closure: $runCommands = function ($url) use (...) { ... }; @@ -1342,9 +1340,11 @@ impl Git { if version.is_none() { *version = Some(None); let mut output = String::new(); - // TODO(phase-b): ProcessExecutor::execute takes &mut self; this static fn takes &ProcessExecutor - // For now, mimic the call signature (compilation fix is Phase B) - let exit_code: i64 = 0; // process.execute(&["git", "--version"].map(String::from).to_vec(), &mut output, None); + let exit_code: i64 = process.borrow_mut().execute_args( + &["git".to_string(), "--version".to_string()], + &mut output, + Option::<&str>::None, + ); if exit_code == 0 { let mut matches: IndexMap = IndexMap::new(); if Preg::is_match_strict_groups3( -- cgit v1.3.1