MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / git_command

Function git_command

src/worktree.rs:163–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161
162#[cfg(test)]
163fn git_command() -> Command {
164 let mut command = Command::new("git");
165 let mut paths: Vec<PathBuf> = std::env::var_os("PATH")
166 .map(|path| std::env::split_paths(&path).collect())
167 .unwrap_or_default();
168 #[cfg(not(windows))]
169 {
170 paths.push(PathBuf::from("/usr/bin"));
171 paths.push(PathBuf::from("/bin"));
172 }
173 if let Ok(path) = std::env::join_paths(paths) {
174 command.env("PATH", path);
175 }
176 command
177}
178
179#[cfg(not(test))]
180fn git_command() -> Command {

Callers 2

git_outputFunction · 0.85
run_gitFunction · 0.85

Calls 3

collectMethod · 0.80
pushMethod · 0.80
git_programFunction · 0.70

Tested by

no test coverage detected