gitwrapper

package
v0.0.0-...-e833055 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTagIndex

func FindTagIndex(tags []*Tag, name string) int

Types

type Branch

type Branch struct {
	Commits []*Commit
}

func GetBranch

func GetBranch(branchName string, path string) (*Branch, error)

GetBranch uses the internal go-git library to check out a branch and add all the commits in said branch as Commit objects.

func GetCurrentBranch

func GetCurrentBranch(path string) (*Branch, error)

type Commit

type Commit struct {
	Hash    string
	Message string
	Time    time.Time
	Author  string
	Email   string
}

func GetCommitRangeBetween

func GetCommitRangeBetween(commits []*Commit, from string, to string) []*Commit

func GetCommitRangeFrom

func GetCommitRangeFrom(commits []*Commit, from string) []*Commit

func GetCommitRangeTo

func GetCommitRangeTo(commits []*Commit, from string) []*Commit

type Tag

type Tag struct {
	Name    string
	Hash    string
	TagHash string
	Tagger  string
	Email   string
	Message string
	Time    time.Time
}

func FindTag

func FindTag(tags []*Tag, name string) *Tag

func FindTagByHash

func FindTagByHash(tags []*Tag, hash string) *Tag

func GetTagRangeBetween

func GetTagRangeBetween(tags []*Tag, fromHash string, toHash string) []*Tag

func GetTagRangeFrom

func GetTagRangeFrom(tags []*Tag, from string) []*Tag

func GetTagRangeTo

func GetTagRangeTo(tags []*Tag, from string) []*Tag

func GetTags

func GetTags(path string) ([]*Tag, error)

GetTags parses repository tags and returns a list of Tag objects.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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