MCPcopy Create free account
hub / github.com/cli/cli / IsFullyQualifiedRef

Function IsFullyQualifiedRef

internal/skills/discovery/discovery.go:133–135  ·  view source on GitHub ↗

IsFullyQualifiedRef returns true if ref uses the "refs/heads/" or "refs/tags/" prefix.

(ref string)

Source from the content-addressed store, hash-verified

131
132// IsFullyQualifiedRef returns true if ref uses the "refs/heads/" or "refs/tags/" prefix.
133func IsFullyQualifiedRef(ref string) bool {
134 return strings.HasPrefix(ref, "refs/heads/") || strings.HasPrefix(ref, "refs/tags/")
135}
136
137// ShortRef strips the "refs/heads/" or "refs/tags/" prefix from a fully qualified ref,
138// returning the short name. If the ref is not fully qualified it is returned as-is.

Callers 1

TestIsFullyQualifiedRefFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsFullyQualifiedRefFunction · 0.68