repo

package
v14.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkingTree

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

WorkingTree encapsulates a git repository.

func Get

func Get(dir string) (wt WorkingTree, err error)

Get returns a WorkingTree for the specified directory. If the directory is not the root of a git repository the directory hierarchy is walked to find the root (i.e. the directory where the .git dir resides).

func (WorkingTree) Checkout

func (wt WorkingTree) Checkout(hash string) error

Checkout calls "git checkout" with the specified hash.

func (WorkingTree) Clone

func (wt WorkingTree) Clone(dest string) (result WorkingTree, err error)

Clone calls "git clone", cloning the working tree into the specified directory. The returned WorkingTree points to the clone of the repository.

func (WorkingTree) Root

func (wt WorkingTree) Root() string

Root returns the root directory of the working tree.

Jump to

Keyboard shortcuts

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