(r GitRepository)
| 238 | } |
| 239 | |
| 240 | func (c GoGitClient) GetLastCommitHash(r GitRepository) (hash string, err error) { |
| 241 | r.Logger.Log("Get current commit hash") |
| 242 | |
| 243 | rep, err := openRepository(r, GitRepositoryFullPath) |
| 244 | if err != nil { |
| 245 | return |
| 246 | } |
| 247 | |
| 248 | headRef, err := rep.Head() |
| 249 | if err != nil { |
| 250 | return |
| 251 | } |
| 252 | hash = headRef.Hash().String() |
| 253 | return |
| 254 | } |
| 255 | |
| 256 | func (c GoGitClient) GetLastRemoteCommitHash(r GitRepository) (hash string, err error) { |
| 257 |
nothing calls this directly
no test coverage detected