gitWrapper

package
v0.0.0-...-9e05265 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 5 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 {
	TagsMap map[plumbing.Hash]*plumbing.Reference
	*git.Repository
}

Git struct wrapps Repository class from go-git to add a tag map used to perform queries when describing.

func PlainOpen

func PlainOpen(path string) (*Git, error)

PlainOpen opens a git repository from the given path. It detects if the repository is bare or a normal one. If the path doesn't contain a valid repository ErrRepositoryNotExists is returned

func (*Git) Describe

func (g *Git) Describe(reference *plumbing.Reference) (string, error)

Describe the reference as 'git describe --tags' will do

Jump to

Keyboard shortcuts

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