func cloneRepo() *git.Repository { ui.Printf("Cloning seita repo...\n") repo, err := git.Clone(GetRepoURL(), GetRepoPath(), &git.CloneOptions{}) if err != nil { log.Fatalf("Could not clone seita repo: %s", err) } return repo }
func updateRepo() { ui.Printf("Updating seita repo...\n") origin, err := repository.Remotes.Lookup("origin") if err != nil { log.Fatalf("Could not find origin for repo: %s", err) } err = origin.Fetch([]string{}, &git.FetchOptions{}, "") }