git

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalGitOrgs added in v0.0.3

func GetLocalGitOrgs(path string) *[]GitOrg

Types

type GitBranch

type GitBranch struct {
	Info    *GitRepository
	Name    string
	RefName string
	Ref     *plumbing.Reference
}

func NewBranch

func NewBranch(repo *GitRepository, ref *plumbing.Reference) *GitBranch

func (*GitBranch) Checkout

func (b *GitBranch) Checkout() *GitBranch

func (*GitBranch) Delete

func (b *GitBranch) Delete()

func (*GitBranch) IsDefault added in v0.0.2

func (b *GitBranch) IsDefault() bool

func (*GitBranch) Pull

func (b *GitBranch) Pull() *GitBranch

type GitBranches

type GitBranches map[string]GitBranch

func NewBranches

func NewBranches() GitBranches

func (*GitBranches) DefaultBranch

func (b *GitBranches) DefaultBranch() *GitBranch

func (*GitBranches) Delete

func (b *GitBranches) Delete()

func (*GitBranches) FilterByNames

func (b *GitBranches) FilterByNames(names []string) *GitBranches

func (*GitBranches) GetByName

func (b *GitBranches) GetByName(branchName string) *GitBranch

func (*GitBranches) NonDefaultNames

func (b *GitBranches) NonDefaultNames() []string

type GitOrg added in v0.0.3

type GitOrg struct {
	DirEntry *os.DirEntry
	Path     string
}

func NewGitOrg added in v0.0.3

func NewGitOrg(root string, orgDir os.DirEntry) *GitOrg

func (*GitOrg) Repos added in v0.0.3

func (o *GitOrg) Repos() *[]GitRepository

type GitRepository

type GitRepository struct {
	Name          string
	Path          string
	AbsPath       string
	Exists        bool
	Repo          *git.Repository
	DefaultBranch string
}

func NewGitRepository

func NewGitRepository(path string) *GitRepository

func (*GitRepository) Branches

func (r *GitRepository) Branches() *GitBranches

func (*GitRepository) CreateBranch

func (r *GitRepository) CreateBranch(branchName string) *GitBranch

func (*GitRepository) HasBranch

func (r *GitRepository) HasBranch(branchName string) (*GitBranch, bool)

Jump to

Keyboard shortcuts

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