(r GitRepository, target string)
| 149 | } |
| 150 | |
| 151 | func (c GoGitClient) Checkout(r GitRepository, target string) error { |
| 152 | r.Logger.Log("Checkout repository to " + target) |
| 153 | |
| 154 | rep, err := openRepository(r, GitRepositoryFullPath) |
| 155 | if err != nil { |
| 156 | return err |
| 157 | } |
| 158 | |
| 159 | wt, err := rep.Worktree() |
| 160 | |
| 161 | if err != nil { |
| 162 | return err |
| 163 | } |
| 164 | |
| 165 | err = wt.Checkout(&git.CheckoutOptions{ |
| 166 | Hash: plumbing.NewHash(target), |
| 167 | }) |
| 168 | |
| 169 | return err |
| 170 | } |
| 171 | |
| 172 | func (c GoGitClient) CanBePulled(r GitRepository) bool { |
| 173 |
nothing calls this directly
no test coverage detected