gitutil

package
v0.0.0-...-f3c1c9f Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkout

func Checkout(rev string, repo *git.Repository) (string, error)

func CloneOrOpen

func CloneOrOpen(remoteUrl string, cloneDir string, cloneOptions *git.CloneOptions) (*git.Repository, error)

func FastForward

func FastForward(repo *git.Repository, fetchOptions *git.FetchOptions) error

func Gc

func Gc(repoDir string, logger *log.Logger) error

Run git gc to pack the repository, this is necessary because libgit2 has no ability at present to perform house keeping tasks

func Pull

func Pull(url string, destDir string) (*git.Repository, error)

func PullBranch

func PullBranch(url string, branch string, destDir string) (*git.Repository, error)

func ResetRepo

func ResetRepo(repoDir string, logger *log.Logger) error

Cleanup a git repo that is in an interim state from a crashed process, or remove if unable to cleanup

func RevparseToCommit

func RevparseToCommit(rev string, repo *git.Repository) (*git.Commit, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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