MCPcopy Index your code
hub / github.com/HairlessVillager/minecommit / git_cmd

Function git_cmd

minecommit/src/utils/cmd.rs:61–71  ·  view source on GitHub ↗
(
    git_dir: impl AsRef<OsStr>,
    args: impl IntoIterator<Item = impl AsRef<OsStr>>,
)

Source from the content-addressed store, hash-verified

59}
60
61pub fn git_cmd(
62 git_dir: impl AsRef<OsStr>,
63 args: impl IntoIterator<Item = impl AsRef<OsStr>>,
64) -> Command {
65 let mut cmd = Command::new("git");
66 cmd.arg("--git-dir").arg(git_dir);
67 for arg in args {
68 cmd.arg(arg);
69 }
70 cmd
71}
72
73pub fn git_repo_exists(git_dir: &str) -> Result<PathBuf> {
74 let git_dir = PathBuf::from(git_dir);

Callers 9

perform_commitFunction · 0.85
mainFunction · 0.85
commitMethod · 0.85
git_repo_existsFunction · 0.85
git_count_objectsFunction · 0.85
git_repackFunction · 0.85
commitMethod · 0.85
build_treeFunction · 0.85
build_path_to_oidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected