MCPcopy Index your code
hub / github.com/dashed/git-chain / run_git_command

Function run_git_command

tests/common/mod.rs:304–321  ·  view source on GitHub ↗
(current_dir: P, arguments: I)

Source from the content-addressed store, hash-verified

302
303#[allow(dead_code)]
304pub fn run_git_command<I, T, P: AsRef<Path>>(current_dir: P, arguments: I) -> Output
305where
306 I: IntoIterator<Item = T>,
307 T: AsRef<OsStr>,
308{
309 let mut current_dir_buf: PathBuf = current_dir.as_ref().into();
310 if current_dir_buf.is_relative() {
311 current_dir_buf = current_dir_buf.canonicalize().unwrap();
312 }
313
314 let output = assert_cmd::Command::from_std(Command::new("git"))
315 .current_dir(current_dir_buf)
316 .args(arguments)
317 .output()
318 .expect("Failed to run git");
319
320 output
321}
322
323#[allow(dead_code)]
324pub fn run_test_bin_for_rebase<I, T, P: AsRef<Path>>(current_dir: P, arguments: I) -> Output

Calls

no outgoing calls