git

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommitHashes

func GetCommitHashes(repoPath string, commitLimit int) ([]string, error)

GetCommitHashes returns the commit hashes of a given repository ordered by the `git.LogOrderCommitterTime`. If `commitLimit` is 0 all commits will be returned.

func GetGitCandidateList

func GetGitCandidateList(o *cfg.GitConfig) ([]string, error)

GetGitCandidateList returns either git tags or git commit SHAs

func GetTags

func GetTags(repoPath string, tagLimit int, sortTagBy SortOption) ([]string, error)

GetTags returns the commit tags of a given repository ordered alphabetically or by version. If `commitLimit` is 0 all tags will be returned.

func IsValidSortValue

func IsValidSortValue(sortValue string) bool

IsValidSortValue function tries to cast the string to SortedTagBy type

Types

type SortOption

type SortOption string

SortOption type for sort order

const (
	// SortOptionVersion sorts by version
	SortOptionVersion SortOption = "version"
	// SortOptionAlphabetic sorts in alphabetical order
	SortOptionAlphabetic SortOption = "alphabetic"
)

Jump to

Keyboard shortcuts

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