git

package module
v0.0.0-...-edb781d Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2016 License: MIT Imports: 10 Imported by: 2 modules, 1 package

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

View Source
const (
	Unknown Status
	Clean
	Uncommitted
	NoUpstream
	NotMaster

	MustExit Flag
	MustPanic
	Warn
	Verbose
	LocalOnly // i.e. not being in remote is not considered an error
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func New

func New(format richtext.Format, flags ...Flag) *Context

func (*Context) AbbrevRef

func (c *Context) AbbrevRef(targetPath string) (string, error)

func (*Context) Branch

func (c *Context) Branch(targetPath string) (string, error)

func (*Context) Checkout

func (c *Context) Checkout(targetPath, target string) error

func (*Context) Clone

func (c *Context) Clone(targetPath string, url string) error

func (*Context) CommitTime

func (c *Context) CommitTime(targetPath string) (time.Time, error)

func (*Context) IsGit

func (c *Context) IsGit(targetPath string) bool

func (*Context) MostRecentTag

func (c *Context) MostRecentTag(targetPath string) (string, error)

func (*Context) Pull

func (c *Context) Pull(targetPath string) error

func (*Context) RemoteOriginUrl

func (c *Context) RemoteOriginUrl(targetPath string) (string, error)

func (*Context) SHA

func (c *Context) SHA(targetPath string) (string, error)

func (*Context) Status

func (c *Context) Status(path string) (Status, error)

func (*Context) Tags

func (c *Context) Tags(targetPath string) ([]string, error)

func (*Context) TopLevel

func (c *Context) TopLevel(path string) (string, error)

type Flag

type Flag int

func (Flag) String

func (i Flag) String() string

type Status

type Status int

func (Status) String

func (i Status) String() string

Directories

Path Synopsis
_example
go-git-status command

Jump to

Keyboard shortcuts

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