git

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADDED    = "added"
	COPIED   = "copied"
	DELETED  = "deleted"
	MODIFIED = "modified"
	RENAMED  = "renamed"
	TYPE     = "type"
	UNKNOWN  = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name      string
	Operation string
}

Represents a local file.

type Version

type Version struct {
	Branch string
}

Version control.

func New

func New(branch string) (*Version, error)

Initialise a Version struct.

func (*Version) Changes

func (v *Version) Changes(remote, local string) []File

List files that have changed.

func (*Version) Checkout

func (v *Version) Checkout(branch string) error

Checkout to a branch.

func (*Version) RefHead

func (v *Version) RefHead() string

Get the HEAD commit hash.

Jump to

Keyboard shortcuts

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