gitrepo

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatus

func GetStatus(r *git.Repository) (wt *git.Worktree, st git.Status, err error)

GetStatus returns the working tree with its status with external excludes patterns loaded from the `exlcudesfile` setting found in the global git configuration file.

Types

type Guide

type Guide struct {
	Tags  []string
	Depth int
	Hash  plumbing.Hash
	// contains filtered or unexported fields
}

Guide describes the distance in Depth of the value in Hash to the commit with the given Tags or the initial commit if there are no tags.

func GetGuide

func GetGuide(repo *git.Repository, ref *plumbing.Reference, tagPattern *regexp.Regexp) (guide Guide, err error)

GetGuide looks at the given git repository and gives the given plumbing.Reference ref a human-readable name based on another available ref.

func (Guide) AbbreviatedHash

func (n Guide) AbbreviatedHash() string

type TagMap

type TagMap map[plumbing.Hash][]string

func GetTagMap

func GetTagMap(repo *git.Repository) (out TagMap, err error)

GetTagMap returns a map of git plumbing.Hash pointing to one or more annotated and unannotated tag names.

func (TagMap) FindMatches

func (m TagMap) FindMatches(h *plumbing.Hash, p *regexp.Regexp) []string

Jump to

Keyboard shortcuts

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