(project_dir: &Path, branch: &str)
| 321 | } |
| 322 | |
| 323 | pub fn init(project_dir: &Path, branch: &str) -> Result<Repository> { |
| 324 | Repository::discover(project_dir).or_else(|_| { |
| 325 | let mut opts = RepositoryInitOptions::new(); |
| 326 | opts.bare(false); |
| 327 | opts.initial_head(branch); |
| 328 | Repository::init_opts(project_dir, &opts).context("Couldn't init new repository") |
| 329 | }) |
| 330 | } |
| 331 | |
| 332 | /// determines what kind of repository we got |
| 333 | fn determine_repo_kind(remote_url: &str) -> RepoKind { |
no outgoing calls
no test coverage detected