Documentation ¶
Index ¶
- func BuildGitInfo(ctx context.Context, repoRoot string, projectDir string) (result.GitInfo, result.ProjectKey, error)
- func DetectGitRepositoryRoot(path string) (string, error)
- func GetWorktreeStatus(ctx context.Context, path string) (git.Status, error)
- func ListRemoteRefs(ctx context.Context, url types.GitUrl, sshPool *ssh_pool.SshPool, ...) ([]*plumbing.Reference, error)
- func ListRemoteRefsFastSsh(ctx context.Context, url types.GitUrl, sshPool *ssh_pool.SshPool, ...) ([]*plumbing.Reference, error)
- func ListRemoteRefsSlow(ctx context.Context, url types.GitUrl, auth auth2.AuthMethodAndCA) ([]*plumbing.Reference, error)
- func LoadGitignore(p string) ([]gitignore.Pattern, error)
- func PoorMansClone(sourceDir string, targetDir string, coOptions *git.CheckoutOptions) error
- type CheckoutInfo
- type MirroredGitRepo
- func (g *MirroredGitRepo) CloneProjectByCommit(commit string, targetDir string) error
- func (g *MirroredGitRepo) DefaultRef() (string, error)
- func (g *MirroredGitRepo) GetGitTreeByCommit(commitHash string) (*object.Tree, error)
- func (g *MirroredGitRepo) GetObjectByHash(hash string) (object.Object, error)
- func (g *MirroredGitRepo) HasUpdated() bool
- func (g *MirroredGitRepo) IsLocked() bool
- func (g *MirroredGitRepo) LastUpdateTime() time.Time
- func (g *MirroredGitRepo) Lock() error
- func (g *MirroredGitRepo) RemoteRefHashesMap() (map[string]string, error)
- func (g *MirroredGitRepo) SetUpdated(u bool)
- func (g *MirroredGitRepo) Unlock() error
- func (g *MirroredGitRepo) Update() error
- func (g *MirroredGitRepo) Url() types.GitUrl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildGitInfo ¶ added in v2.22.0
func DetectGitRepositoryRoot ¶
func GetWorktreeStatus ¶ added in v2.20.5
GetWorktreeStatus returns the worktree status of the given repo When modified files are found, it will invoke the git binary for "git status --porcelain" to check that things have really changed. This is required because go-git in not properly handling CRLF: https://github.com/go-git/go-git/issues/594
func ListRemoteRefs ¶ added in v2.14.0
func ListRemoteRefsFastSsh ¶ added in v2.14.0
func ListRemoteRefsFastSsh(ctx context.Context, url types.GitUrl, sshPool *ssh_pool.SshPool, auth auth2.AuthMethodAndCA) ([]*plumbing.Reference, error)
ListRemoteRefsFastSsh will reuse existing ssh connections from a pool
func ListRemoteRefsSlow ¶ added in v2.14.0
func PoorMansClone ¶
PoorMansCloneCommit poor mans clone from a local repo, which does not rely on go-git using git-upload-pack
Types ¶
type CheckoutInfo ¶ added in v2.11.2
type MirroredGitRepo ¶
type MirroredGitRepo struct {
// contains filtered or unexported fields
}
func NewMirroredGitRepo ¶
func (*MirroredGitRepo) CloneProjectByCommit ¶ added in v2.13.0
func (g *MirroredGitRepo) CloneProjectByCommit(commit string, targetDir string) error
func (*MirroredGitRepo) DefaultRef ¶
func (g *MirroredGitRepo) DefaultRef() (string, error)
func (*MirroredGitRepo) GetGitTreeByCommit ¶ added in v2.13.0
func (g *MirroredGitRepo) GetGitTreeByCommit(commitHash string) (*object.Tree, error)
func (*MirroredGitRepo) GetObjectByHash ¶ added in v2.20.5
func (g *MirroredGitRepo) GetObjectByHash(hash string) (object.Object, error)
func (*MirroredGitRepo) HasUpdated ¶
func (g *MirroredGitRepo) HasUpdated() bool
func (*MirroredGitRepo) IsLocked ¶ added in v2.11.0
func (g *MirroredGitRepo) IsLocked() bool
func (*MirroredGitRepo) LastUpdateTime ¶ added in v2.9.0
func (g *MirroredGitRepo) LastUpdateTime() time.Time
func (*MirroredGitRepo) Lock ¶
func (g *MirroredGitRepo) Lock() error
func (*MirroredGitRepo) RemoteRefHashesMap ¶
func (g *MirroredGitRepo) RemoteRefHashesMap() (map[string]string, error)
func (*MirroredGitRepo) SetUpdated ¶ added in v2.9.0
func (g *MirroredGitRepo) SetUpdated(u bool)
func (*MirroredGitRepo) Unlock ¶
func (g *MirroredGitRepo) Unlock() error
func (*MirroredGitRepo) Update ¶
func (g *MirroredGitRepo) Update() error
func (*MirroredGitRepo) Url ¶ added in v2.11.2
func (g *MirroredGitRepo) Url() types.GitUrl
Source Files ¶
Click to show internal directories.
Click to hide internal directories.