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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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