git

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

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

Git is a helper for git.

func NewGit

func NewGit() (g *Git, err error)

NewGit instantiates and returns a Git struct.

func (*Git) Branch

func (g *Git) Branch() (branch string, isBranch bool, err error)

Branch returns the current git branch name.

func (*Git) Message

func (g *Git) Message() (message string, err error)

Message returns the commit message. In the case that a commit has multiple parents, the message of the last parent is returned.

func (*Git) SHA

func (g *Git) SHA() (sha string, err error)

SHA returns the sha of the current commit.

func (*Git) Status

func (g *Git) Status() (status string, isClean bool, err error)

Status returns the status of the working tree.

func (*Git) Tag

func (g *Git) Tag() (tag string, isTag bool, err error)

Tag returns the tag name if HEAD is a tag.

Jump to

Keyboard shortcuts

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