(r GitRepository, targetDir GitRepositoryDirType)
| 78 | } |
| 79 | |
| 80 | func openRepository(r GitRepository, targetDir GitRepositoryDirType) (*git.Repository, error) { |
| 81 | |
| 82 | var dir string |
| 83 | |
| 84 | switch targetDir { |
| 85 | case GitRepositoryTmpPath: |
| 86 | dir = util.Config.GetProjectTmpDir(r.Repository.ProjectID) |
| 87 | case GitRepositoryFullPath: |
| 88 | dir = r.GetFullPath() |
| 89 | default: |
| 90 | panic("unknown Repository directory type") |
| 91 | } |
| 92 | |
| 93 | return git.PlainOpen(dir) |
| 94 | } |
| 95 | |
| 96 | func (c GoGitClient) Clone(r GitRepository) error { |
| 97 | r.Logger.Log("Cloning Repository " + r.Repository.GitURL) |
no test coverage detected