(info PortInfo)
| 78 | } |
| 79 | |
| 80 | func resolveGitRef(info PortInfo) (string, error) { |
| 81 | if info.Checksum != "" { |
| 82 | return info.Checksum, nil |
| 83 | } |
| 84 | if git.IsFullCommitHash(info.Ref) { |
| 85 | return info.Ref, nil |
| 86 | } |
| 87 | if info.Ref == "" { |
| 88 | return git.GetRemoteHeadCommit(info.NameVersion, info.Url) |
| 89 | } |
| 90 | return git.GetRemoteRefCommit(info.NameVersion, info.Url, info.Ref) |
| 91 | } |
no test coverage detected