scl

package
v0.0.0-...-bf9f4d5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package scl is an abstraction layer on top of the go-git library.

The 'GlifRepo' object is the struct that encloses the *git.Repository. It also contains maps and slices of tags object used to perform the diffs.

Some of these function are called from the builtins of the interpreter, tying the .gs scripts to this struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlifRepo

type GlifRepo struct {
	Params configuration.GlifParameters

	HeadRef *plumbing.Reference
	GitRepo *git.Repository
	// contains filtered or unexported fields
}

GlifRepo is an abstraction on top of the *git.Repository to allow extended functionnality.

func (*GlifRepo) Fetch

func (glifRepo *GlifRepo) Fetch()

Fetch does a 'Fetch' on the *git.Repository.

func (*GlifRepo) FetchAllMatchingTags

func (glifRepo *GlifRepo) FetchAllMatchingTags(regexString string) bool

FetchAllMatchingTags uses a regex to match tags (by name) in the git repository. Used in the following builtin(s):

  • extractTags

func (*GlifRepo) GetLatestTag

func (glifRepo *GlifRepo) GetLatestTag(offset int64) *object.Tag

GetLatestTag returns the appropriate *object.Tag that correspond to the specified offset. GetLatestTag(0) would return the very latest tag because it would return the first index of the slice 'tagsLatestToEarliest' Used in the following builtin(s):

  • getLatestTag

func (*GlifRepo) GetSpecificTag

func (glifRepo *GlifRepo) GetSpecificTag(tagName string) *object.Tag

GetSpecificTag returns the appropriate *object.Tag that correspond to the specified name

func (*GlifRepo) InitHeadRef

func (glifRepo *GlifRepo) InitHeadRef()

InitHeadRef does a 'Head' on the *git.Repository. This will return a *plumbing.Reference corresponding to the git 'HEAD' reference.

func (*GlifRepo) Open

func (glifRepo *GlifRepo) Open(repoLoc string)

Open does a 'PlainOpen' on the *git.Repository and will create the map and slice of *object.Tag.

Jump to

Keyboard shortcuts

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