git

package
v1.28.2-0...-a792dfb Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectGitRepositoryRoot

func DetectGitRepositoryRoot(path string) (string, error)

func PoorMansClone

func PoorMansClone(sourceDir string, targetDir string, ref string) error

PoorMansClone poor mans clone from a local repo, which does not rely on go-git using git-upload-pack

Types

type GitRepoInfo

type GitRepoInfo struct {
	CheckedOutRef    string
	CheckedOutCommit string
}

func GetGitRepoInfo

func GetGitRepoInfo(path string) (ri GitRepoInfo, err error)

type MirroredGitRepo

type MirroredGitRepo struct {
	// contains filtered or unexported fields
}

func NewMirroredGitRepo

func NewMirroredGitRepo(u git_url.GitUrl) (*MirroredGitRepo, error)

func (*MirroredGitRepo) CloneProject

func (g *MirroredGitRepo) CloneProject(ref string, targetDir string) error

func (*MirroredGitRepo) DefaultRef

func (g *MirroredGitRepo) DefaultRef() *string

func (*MirroredGitRepo) HasUpdated

func (g *MirroredGitRepo) HasUpdated() bool

func (*MirroredGitRepo) Lock

func (g *MirroredGitRepo) Lock() error

func (*MirroredGitRepo) MaybeWithLock

func (g *MirroredGitRepo) MaybeWithLock(lock bool, cb func() error) error

func (*MirroredGitRepo) RemoteRefHashesMap

func (g *MirroredGitRepo) RemoteRefHashesMap() map[string]string

func (*MirroredGitRepo) Unlock

func (g *MirroredGitRepo) Unlock() error

func (*MirroredGitRepo) Update

func (g *MirroredGitRepo) Update(authProviders *auth2.GitAuthProviders) error

func (*MirroredGitRepo) WithLock

func (g *MirroredGitRepo) WithLock(cb func() error) error

Directories

Path Synopsis
This is copied from https://github.com/sosedoff/gitkit and simplified
This is copied from https://github.com/sosedoff/gitkit and simplified

Jump to

Keyboard shortcuts

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