git

package
v0.0.0-...-811c986 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotABranch            = errors.New("you must be on a branch to use it as default head")
	ErrBranchNotFound        = errors.New("branch not found")
	ErrGitRepositoryNotFound = errors.New("repository not found")
	ErrRemoteNotFound        = errors.New("remote not found")
)

Functions

func IsDirectChild

func IsDirectChild(parent, child *object.Commit) bool

Types

type Repo

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

func FromPwd

func FromPwd() (*Repo, error)

func New

func New(p string) (*Repo, error)

func (*Repo) ConfigPath

func (me *Repo) ConfigPath() string

func (*Repo) GetActualBranch

func (me *Repo) GetActualBranch() (string, error)

func (*Repo) GetBranchCommit

func (me *Repo) GetBranchCommit(branch string) (*object.Commit, error)

func (*Repo) GetDifferenceCommit

func (me *Repo) GetDifferenceCommit(hd, bs string) ([]string, error)

func (*Repo) GetEditor

func (me *Repo) GetEditor() (string, error)

GetEditor returns the editor used by git to edit text

func (*Repo) GetRemoteURLs

func (me *Repo) GetRemoteURLs(remote string) ([]string, error)

func (*Repo) HasChanges

func (me *Repo) HasChanges() bool

func (*Repo) IsBranchUpToDate

func (me *Repo) IsBranchUpToDate(branch string) (bool, error)

func (*Repo) LoadConfig

func (me *Repo) LoadConfig(obj interface{}) error

LoadConfig takes any object and try to unmarshal the config into it use the ini tag to make it parsable

Jump to

Keyboard shortcuts

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