git

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckoutHead

func CheckoutHead(dir string, branch string) error

func CheckoutRef

func CheckoutRef(dir string, ref *plumbing.Reference) error

func CheckoutRefName

func CheckoutRefName(dir string, ref *plumbing.Reference) error

func CheckoutTag

func CheckoutTag(dir string, tag string) error

func CleanTagRefName

func CleanTagRefName(refName string) string

func CleanTagReference

func CleanTagReference(tagRef *plumbing.Reference) string

clean the tag ref

func FormatRef

func FormatRef(ref *plumbing.Reference) string

func GetHeadCommit

func GetHeadCommit(dir string) (ref *plumbing.Reference, err error)

func GetLastTag

func GetLastTag(dir string) string

func GetLastTagRef

func GetLastTagRef(dir string) *plumbing.Reference

func WalkRepo

func WalkRepo(s string, d fs.DirEntry, err error) error

Types

type Repository

type Repository struct {
	*git.Repository
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(repo *git.Repository, auth *githttp.BasicAuth, localDir string) *Repository

func (*Repository) FetchUpstreamBranch

func (gr *Repository) FetchUpstreamBranch(branch string) error

func (*Repository) GetLocalDirectory

func (gr *Repository) GetLocalDirectory() string

func (*Repository) GetMergeBase

func (gr *Repository) GetMergeBase(oldest, newest string) (string, error)

func (*Repository) GetModifiedFileNamesBetweenCommits

func (gr *Repository) GetModifiedFileNamesBetweenCommits(oldest, newest string) ([]string, error)

Jump to

Keyboard shortcuts

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