diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-24 21:10:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-24 21:11:03 +0900 |
| commit | a8f115666344abe3b606a4a65595ca301e7ac08a (patch) | |
| tree | 9af244392d41542fae74ceab1be0b8fb473bdd46 /crates/shirabe/src/repository/vcs/fossil_driver.rs | |
| parent | 6dcc2125974e350d1844c5ce1bb3562e224f3435 (diff) | |
| download | php-shirabe-a8f115666344abe3b606a4a65595ca301e7ac08a.tar.gz php-shirabe-a8f115666344abe3b606a4a65595ca301e7ac08a.tar.zst php-shirabe-a8f115666344abe3b606a4a65595ca301e7ac08a.zip | |
refactor(process): take cwd as Option<&str> instead of IntoExecCwd
Replace the generic cwd parameter backed by the IntoExecCwd trait with a
concrete Option<&str> across execute/execute_args/execute_tty/execute_async.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository/vcs/fossil_driver.rs')
| -rw-r--r-- | crates/shirabe/src/repository/vcs/fossil_driver.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/shirabe/src/repository/vcs/fossil_driver.rs b/crates/shirabe/src/repository/vcs/fossil_driver.rs index 1da7a2a..ebc0ac4 100644 --- a/crates/shirabe/src/repository/vcs/fossil_driver.rs +++ b/crates/shirabe/src/repository/vcs/fossil_driver.rs @@ -103,7 +103,7 @@ impl FossilDriver { if self.inner.process.borrow_mut().execute_args( ["fossil", "version"].map(|s| s.to_string()).as_ref(), &mut ignored_output, - (), + None, ) != 0 { return Err(RuntimeException { @@ -143,13 +143,13 @@ impl FossilDriver { && self.inner.process.borrow_mut().execute_args( ["fossil", "info"].map(|s| s.to_string()).as_ref(), &mut String::new(), - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ) == 0 { if self.inner.process.borrow_mut().execute_args( ["fossil", "pull"].map(|s| s.to_string()).as_ref(), &mut String::new(), - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ) != 0 { self.inner.io.write_error3(&format!( @@ -170,7 +170,7 @@ impl FossilDriver { .map(|s| s.to_string()) .as_ref(), &mut output, - (), + None, ) != 0 { let output = self.inner.process.borrow().get_error_output().to_string(); @@ -189,7 +189,7 @@ impl FossilDriver { .map(|s| s.to_string()) .as_ref(), &mut output, - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ) != 0 { let output = self.inner.process.borrow().get_error_output().to_string(); @@ -248,7 +248,7 @@ impl FossilDriver { .map(|s| s.to_string()) .as_ref(), &mut content, - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ); if content.trim().is_empty() { @@ -268,7 +268,7 @@ impl FossilDriver { .map(|s| s.to_string()) .as_ref(), &mut output, - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ); let parts: Vec<&str> = output.trim().splitn(3, ' ').collect(); let date = parts.get(1).copied().unwrap_or(""); @@ -284,7 +284,7 @@ impl FossilDriver { self.inner.process.borrow_mut().execute_args( ["fossil", "tag", "list"].map(|s| s.to_string()).as_ref(), &mut output, - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ); for tag in self.inner.process.borrow().split_lines(&output) { tags.insert(tag.clone(), tag); @@ -301,7 +301,7 @@ impl FossilDriver { self.inner.process.borrow_mut().execute_args( ["fossil", "branch", "list"].map(|s| s.to_string()).as_ref(), &mut output, - Some(self.checkout_dir.clone()), + Some(&self.checkout_dir), ); for branch in self.inner.process.borrow().split_lines(&output) { let branch = Preg::replace(r"/^\*/", "", branch.trim()); @@ -342,7 +342,7 @@ impl FossilDriver { if process.execute_args( ["fossil", "info"].map(|s| s.to_string()).as_ref(), &mut output, - Some(url), + Some(&url), ) == 0 { return Ok(true); |
