(
git_dir: impl AsRef<OsStr>,
args: impl IntoIterator<Item = impl AsRef<OsStr>>,
)
| 59 | } |
| 60 | |
| 61 | pub 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 | |
| 73 | pub fn git_repo_exists(git_dir: &str) -> Result<PathBuf> { |
| 74 | let git_dir = PathBuf::from(git_dir); |
no outgoing calls
no test coverage detected