git

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CloneOrUpdate = DefaultCloneOrUpdate
	UpdateRepo    = DefaultUpdateRepo
	CloneRepoFunc = CloneRepo
)

Function variables to allow mocking in tests

Functions

func CloneRepo

func CloneRepo(repoURL, repoPath string, logger logger.LoggerInterface) error

CloneRepo clones a Git repository into the specified path.

func DefaultCloneOrUpdate

func DefaultCloneOrUpdate(repoURL, repoPath string, logger logger.LoggerInterface) error

Default implementation of CloneOrUpdate

func DefaultUpdateRepo

func DefaultUpdateRepo(repoPath string, logger logger.LoggerInterface) error

Default implementation of UpdateRepo

func ForceReclone

func ForceReclone(repoURL, repoPath string, logger logger.LoggerInterface) error

ForceReclone removes an existing repository and re-clones it.

func IsValidGitRepo

func IsValidGitRepo(repoPath string) bool

IsValidGitRepo checks if the given path is a valid Git repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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