git

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryNotFound     = errors.New("repository not found")
	ErrEmptyRemoteRepository  = errors.New("remote repository is empty")
	ErrAuthenticationRequired = errors.New("authentication required")
	ErrAuthorizationFailed    = errors.New("authorization failed")
)

Functions

func Pull

func Pull(s *Repo, insecure bool) error

func TagExists

func TagExists(tag string, r *git.Repository) (bool, error)

func Tags

func Tags(repoUrl string, auth transport.AuthMethod, insecure bool) ([]string, error)

Types

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

Repo is an in-memory git repository

func Clone

func Clone(repoUrl string, auth transport.AuthMethod, insecure bool) (*Repo, error)

func (*Repo) Branch

func (s *Repo) Branch(name string) error

func (*Repo) Commit

func (s *Repo) Commit(path, msg string) (string, error)

func (*Repo) CreateTag

func (s *Repo) CreateTag(tag string) (bool, error)

func (*Repo) Exists

func (s *Repo) Exists(path string) (bool, error)

func (*Repo) FS

func (s *Repo) FS() billy.Filesystem

func (*Repo) Push

func (s *Repo) Push(downstream, branch string, insecure bool) error

func (*Repo) PushTags

func (s *Repo) PushTags(token string, insecure bool) error

Jump to

Keyboard shortcuts

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