package git¶
Package git wraps the go-git operations the resolver needs: resolving a ref to a commit SHA without fetching, listing a repo's tags, and cloning a repo at a specific ref into a directory.
Functions¶
func Clone¶
Clone clones the repo at url into dest and checks out ref. dest must not yet exist. Returns the resolved commit SHA.
func ListTags¶
ListTags returns the tag names defined on the remote at url, without the `refs/tags/` prefix. Peeled annotated-tag refs (the `^{}` entries) are excluded so each tag appears once. No local clone is created. Order is whatever the remote reports; callers that need ordering sort the result themselves.
func LsRemote¶
LsRemote returns the commit SHA that ref points at on the remote at url. ref may be a tag, branch, or a full commit SHA. No local clone is created.