git

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitFiles

func CommitFiles(sList []string, m string) (err error)

CommitFiles adds the given files to staging and commits them with the given message

func CreateTag

func CreateTag(tag, msg string) (err error)

CreateTag creates an annotated tag

func Describe

func Describe(hash string, exact ...bool) (string, error)

Describe returns the corresponding tag for the given hash

func FileChanged

func FileChanged(file string) bool

FileChanged checks if a file changed and should be added to staging

func GetLatestTag

func GetLatestTag(noFetch bool) (tag string, err error)

GetLatestTag Returns the latest tag for the git repo related to the working directory

func HasGit

func HasGit() bool

HasGit checks if the git command exists in PATH

func RemoveFromStaging

func RemoveFromStaging(sList []string, ignoreErrors bool) (err error)

RemoveFromStaging removes the given files from the stagin area

Types

type RestoreCwdFunc

type RestoreCwdFunc func() error

RestoreCwdFunc defines the signature of the closure to restore the working directory

func MoveToRootDir

func MoveToRootDir() (RestoreCwdFunc, error)

MoveToRootDir changes working directory to git's root

Jump to

Keyboard shortcuts

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