pub fn create_fixture_repo() -> io::Result<PathBuf> {
    let fixture_repo_path = new_tempdir()?.path().join("fixture");
    let repo_path = new_tempdir()?.path().join("rocket");
    let fixture_path = env::current_dir()?.join("tests/fixtures/rocket.bundle");

    let fixture_repo_dir = path_str(&fixture_repo_path)?;
    let repo_dir = path_str(&repo_path)?;
    let fixture = path_str(&fixture_path)?;

    Command::new("git")
        .args(&["clone", "-b", "master", fixture, fixture_repo_dir])
        .output()?;

    git2::Repository::clone(fixture_repo_dir, repo_dir).ok();

    Command::new("git")
        .args(&["config", "--local", "user.email", "starship@example.com"])
        .current_dir(repo_dir)
        .output()?;

    Command::new("git")
        .args(&["config", "--local", "user.name", "starship"])
        .current_dir(repo_dir)
        .output()?;

    Ok(repo_path)
}
/// Create a repo from the fixture to be used in git module tests
Create a repo from the fixture to be used in git module tests
Create a repo from the fixture to be used in git module tests
pub fn create_fixture_repo() -> io::Result<PathBuf> {
    let fixture_repo_path = new_tempdir()?.path().join("fixture");
    let repo_path = new_tempdir()?.path().join("rocket");
    let fixture_path = env::current_dir()?.join("tests/fixtures/rocket.bundle");
    let fixture_repo_dir = path_str(&fixture_repo_path)?;
    let repo_dir = path_str(&repo_path)?;
    let fixture = path_str(&fixture_path)?;
    Command::new("git")
        .args(&["clone", "-b", "master", fixture, fixture_repo_dir])
        .output()?;
    git2::Repository::clone(fixture_repo_dir, repo_dir).ok();
    Command::new("git")
        .args(&["config", "--local", "user.email", "starship@example.com"])
        .current_dir(repo_dir)
        .output()?;
    Command::new("git")
        .args(&["config", "--local", "user.name", "starship"])
        .current_dir(repo_dir)
        .output()?;
    Ok(repo_path)
}
pub fn create_fixture_repo ( ) -> io :: Result < PathBuf > { let fixture_repo_path = new_tempdir ( ) ? . path ( ) . join ( " " ) ; let repo_path = new_tempdir ( ) ? . path ( ) . join ( " " ) ; let fixture_path = env :: current_dir ( ) ? . join ( " " ) ; let fixture_repo_dir = path_str ( & fixture_repo_path ) ? ; let repo_dir = path_str ( & repo_path ) ? ; let fixture = path_str ( & fixture_path ) ? ; Command :: new ( " " ) . args ( & [ " " , " " , " " , fixture , fixture_repo_dir ] ) . output ( ) ? ; git2 :: Repository :: clone ( fixture_repo_dir , repo_dir ) . ok ( ) ; Command :: new ( " " ) . args ( & [ " " , " " , " " , " " ] ) . current_dir ( repo_dir ) . output ( ) ? ; Command :: new ( " " ) . args ( & [ " " , " " , " " , " " ] ) . current_dir ( repo_dir ) . output ( ) ? ; Ok ( repo_path ) }
Create a repo from the fixture to be used in git module tests
Create a repo from the fixture to be used in git module tests