gt

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

README

gt

GT: Git Tools - assortment of useful functions dealing with Git repositories

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type GitRepo

type GitRepo struct {
	URL        string
	Path       string
	BranchName string
	Repo       *git.Repository
	PublicKeys *gitssh.PublicKeys
}

func New

func New(repoURL, branchName, repoPath string) (*GitRepo, error)

func (*GitRepo) Clone

func (gr *GitRepo) Clone() error

func (*GitRepo) CloneOptions

func (gr *GitRepo) CloneOptions() *git.CloneOptions

func (*GitRepo) CloneOrPull

func (gr *GitRepo) CloneOrPull() error

func (*GitRepo) EnsurePath

func (gr *GitRepo) EnsurePath() error

func (*GitRepo) LatestSHA

func (gr *GitRepo) LatestSHA(length int) string

func (*GitRepo) Open

func (gr *GitRepo) Open()

func (*GitRepo) Pull

func (gr *GitRepo) Pull() error

func (*GitRepo) PullOptions

func (gr *GitRepo) PullOptions() *git.PullOptions

func (*GitRepo) ReferenceName

func (gr *GitRepo) ReferenceName() plumbing.ReferenceName

func (*GitRepo) RevisionExists added in v0.1.3

func (gr *GitRepo) RevisionExists(revName string) bool

func (*GitRepo) SetKeys

func (gr *GitRepo) SetKeys(privateKey []byte) error

func (GitRepo) Worktree

func (gr GitRepo) Worktree() *git.Worktree

Jump to

Keyboard shortcuts

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