MCPcopy Create free account
hub / github.com/celer-pkg/celer / resolveGitRef

Function resolveGitRef

pkgs/refs/refs.go:80–91  ·  view source on GitHub ↗
(info PortInfo)

Source from the content-addressed store, hash-verified

78}
79
80func 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}

Callers 1

resolvePortFunction · 0.85

Calls 3

IsFullCommitHashFunction · 0.92
GetRemoteHeadCommitFunction · 0.92
GetRemoteRefCommitFunction · 0.92

Tested by

no test coverage detected