public static GitRepository CreateNewByCloning(GitRepository sourceRepo, string parentDirOfNewRepository, string newPersonName) { string repositoryPath = Path.Combine(parentDirOfNewRepository, newPersonName ); using (new ConsoleProgress("Creating {0} from {1}", newPersonName, sourceRepo.UserName)) { Execute("clone", null, sourceRepo.PathWithQuotes + " " + SurroundWithQuotes(repositoryPath)); SetupPerson(repositoryPath, newPersonName); GitRepository repository = new GitRepository(repositoryPath, newPersonName); repository.AddFake(); return repository; } }
public static GitRepository CreateNewByCloning(GitRepository sourceRepo, string parentDirOfNewRepository, string newPersonName) { string repositoryPath = Path.Combine(parentDirOfNewRepository, newPersonName); using (new ConsoleProgress("Creating {0} from {1}", newPersonName, sourceRepo.UserName)) { Execute("clone", null, sourceRepo.PathWithQuotes + " " + SurroundWithQuotes(repositoryPath)); SetupPerson(repositoryPath, newPersonName); GitRepository repository = new GitRepository(repositoryPath, newPersonName); repository.AddFake(); return(repository); } }
public static GitRepository CreateNewDirectoryAndRepository(string parentDirOfNewRepository, string userName) { // string repositoryPath = MakeDirectoryForUser(parentDirOfNewRepository, userName); string repositoryPath = Path.Combine(parentDirOfNewRepository, userName); using (new ConsoleProgress("Creating {0} from scratch", userName)) { Execute("init", null, SurroundWithQuotes(repositoryPath)); SetupPerson(repositoryPath, userName); GitRepository repo = new GitRepository(repositoryPath, userName); repo.AddFake(); return(repo); } }
public static GitRepository CreateNewDirectoryAndRepository(string parentDirOfNewRepository, string userName) { // string repositoryPath = MakeDirectoryForUser(parentDirOfNewRepository, userName); string repositoryPath = Path.Combine(parentDirOfNewRepository, userName); using (new ConsoleProgress("Creating {0} from scratch", userName)) { Execute("init", null, SurroundWithQuotes(repositoryPath)); SetupPerson(repositoryPath, userName); GitRepository repo = new GitRepository(repositoryPath, userName); repo.AddFake(); return repo; } }