git

package
v0.6.7-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(FS billy.Filesystem, remote, owner, repo, tag string, private bool) error

FetchGit clone the repository inside FS. If private flag is set, it will look for netrc credentials, fallbacking to SSH

func IndexGitRemote

func IndexGitRemote(url, req string) (*plumbing.Reference, []*plumbing.Reference, error)

given a git url, and a req (required) version returns the minReference, allRefferences, and error

Types

type GitRepo

type GitRepo struct {
	Store storage.Storer
	FS    billy.Filesystem

	Repo *gogit.Repository

	Remote *gogit.Remote

	FetchOptions *gogit.FetchOptions
	ListOptions  *gogit.ListOptions
}

func CloneLocalRepo

func CloneLocalRepo(location string) (*GitRepo, error)

func CloneRepoRef

func CloneRepoRef(srcUrl string, ref *plumbing.Reference) (*GitRepo, error)

func NewRemote

func NewRemote(srcUrl string) (*GitRepo, error)

func (*GitRepo) ClonedRefs

func (R *GitRepo) ClonedRefs() ([]*plumbing.Reference, error)

func (*GitRepo) RemoteRefs

func (R *GitRepo) RemoteRefs() ([]*plumbing.Reference, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL