Documentation
¶
Overview ¶
Package gitremote reads a remote repository's refs over HTTPS (§5.8 polling): the equivalent of `git ls-remote`, without a git binary or a clone. It speaks the smart HTTP protocol and falls back to dumb HTTP.
Index ¶
- Variables
- func BranchSHA(refs map[string]string, branch string) (string, bool)
- func IsPattern(p string) bool
- func LsRemote(ctx context.Context, repoURL, token string) (map[string]string, error)
- func Match(refs map[string]string, branches, tags string) map[string]string
- func ShortRef(ref string) string
- func ValidatePattern(p string) error
- func ValidateURL(raw string) error
Constants ¶
This section is empty.
Variables ¶
var SelfSignedCA func(host string) string
SelfSignedCA returns the certificate of a platform host (the built-in Git server) while it is self-signed, so polling it works on private networks; nil or "" = system roots only.
Functions ¶
func Match ¶
Match returns the refs whose branch matches branches or whose tag matches tags ("" = none), as full ref name -> commit. Annotated tags resolve to the commit they point at.
func ValidatePattern ¶
ValidatePattern checks a branch or tag pattern: a name, optionally with globs ("release/*", "v*").
func ValidateURL ¶
ValidateURL accepts http(s) repository URLs without embedded credentials.
Types ¶
This section is empty.