{"modulePath":"github.com/wolfi-dev/wolfictl","version":"v0.39.34","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package git\n\n## Functions\n\n```go\nfunc CreateTag(dir, tag string) error\n```\n\n```go\nfunc FindForkPoint(repo *git.Repository, branchRef, upstreamRef *plumbing.Reference) (*plumbing.Hash, error)\n```\nFindForkPoint finds the fork point between the local branch and the upstream branch.\n\nThe fork point is the commit hash of the latest commit had in common between the local branch and the upstream branch.\n\nThe local branch is the branch pointed to by the provided branchRef.\n\nThe upstream branch is the branch pointed to by the provided upstreamRef.\n\nThe caller is responsible for closing the provided repo.\n\n```go\nfunc GetGitAuth(gitURL string) (*gitHttp.BasicAuth, error)\n```\n\n```go\nfunc GetGitAuthorSignature() *object.Signature\n```\n\n```go\nfunc GetVersionFromTag(dir string, index int) (*version.Version, error)\n```\nGetVersionFromTag sorts git tags and returns the provided index e.g. index=1 will return the most recent tag\n\n```go\nfunc PushTag(dir, tagName string) error\n```\n\n```go\nfunc SetGitSignOptions(repoPath string) error\n```\n\n```go\nfunc TempClone(gitURL, hash string, useAuth bool) (repoDir string, err error)\n```\nTempClone clones the repo using the provided HTTPS URL to a temp directory, and returns the path to the temp directory.\n\nIf hash is non-empty, the repo will be checked out to that commit hash.\n\nIf user authentication is requested, a personal access token will be read in from the GITHUB\\_TOKEN environment variable.\n\nThe caller is responsible for cleaning up the temp directory.\n\n## Types\n\n```go\ntype URL struct {\n\tScheme       string\n\tHost         string\n\tOrganisation string\n\tName         string\n\tRawURL       string\n}\n```\n\n```go\nfunc GetRemoteURL(repo *git.Repository) (*URL, error)\n```\n\n```go\nfunc GetRemoteURLFromDir(dir string) (*URL, error)\n```\n\n```go\nfunc ParseGitURL(rawURL string) (*URL, error)\n```\nParseGitURL returns owner, repo name, errors\n\n","path":"github.com/wolfi-dev/wolfictl/pkg/git","name":"git","synopsis":"","isRedistributable":true}
