git

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommit

func AddCommit(r *git.Repository, author string) error

func Checkout

func Checkout(r *git.Repository, ref string, toBranch string, auth transport.AuthMethod) error

func CloneRepository

func CloneRepository(path string, repoUrl string, auth transport.AuthMethod) (*git.Repository, error)

func DiscardAllUnstagedChanges

func DiscardAllUnstagedChanges(r *git.Repository) error

func OpenRepository

func OpenRepository(path string) (*git.Repository, error)

func Push

func Push(r *git.Repository, auth transport.AuthMethod) error

func TokenGenerator

func TokenGenerator() string

Types

type RefSortOrder

type RefSortOrder byte
const (
	RefSortOrderAscending RefSortOrder = iota
	RefSortOrderDescending
)

type RemoteRefConstraints

type RemoteRefConstraints struct {
	Include   bool
	Sort      bool
	SortOrder RefSortOrder
}

type RemoteRefs

type RemoteRefs struct {
	Name     string
	Branches []string
	Tags     []string
}

func GetRemoteRefs

func GetRemoteRefs(
	r *git.Repository,
	auth transport.AuthMethod,
	tagConstraints *RemoteRefConstraints,
	branchConstraints *RemoteRefConstraints) (remoteRefsList []*RemoteRefs, err error)

Jump to

Keyboard shortcuts

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