Documentation
¶
Index ¶
- Constants
- func GetBaseWorkTreeDir() string
- func HasSubmodulesInCommit(commit *object.Commit) (bool, error)
- type Archive
- type ArchiveFile
- type ArchiveOptions
- type ArchiveType
- type Base
- type Checksum
- type ChecksumDescriptor
- type ChecksumOptions
- type FilterOptions
- type GitRepo
- type Local
- func (repo *Local) Checksum(opts ChecksumOptions) (Checksum, error)
- func (repo *Local) CreateArchive(opts ArchiveOptions) (Archive, error)
- func (repo *Local) CreatePatch(opts PatchOptions) (Patch, error)
- func (repo *Local) FindCommitIdByMessage(regex string) (string, error)
- func (repo *Local) GetCurrentBranchName() string
- func (repo *Local) GetCurrentTagName() string
- func (repo *Local) GetHeadCommit() string
- func (repo *Local) HeadBranchName() (string, error)
- func (repo *Local) HeadCommit() (string, error)
- func (repo *Local) IsBranchState() bool
- func (repo *Local) IsCommitExists(commit string) (bool, error)
- func (repo *Local) IsEmpty() (bool, error)
- func (repo *Local) IsTagState() bool
- func (repo *Local) RemoteBranchesList() ([]string, error)
- func (repo *Local) RemoteOriginUrl() (string, error)
- func (repo *Local) TagsList() ([]string, error)
- type Patch
- type PatchFile
- type PatchOptions
- type Remote
- func (repo *Remote) Checksum(opts ChecksumOptions) (Checksum, error)
- func (repo *Remote) Clone() (bool, error)
- func (repo *Remote) CloneAndFetch() error
- func (repo *Remote) CreateArchive(opts ArchiveOptions) (Archive, error)
- func (repo *Remote) CreatePatch(opts PatchOptions) (Patch, error)
- func (repo *Remote) Fetch() error
- func (repo *Remote) FindCommitIdByMessage(regex string) (string, error)
- func (repo *Remote) HeadBranchName() (string, error)
- func (repo *Remote) HeadCommit() (string, error)
- func (repo *Remote) IsCommitExists(commit string) (bool, error)
- func (repo *Remote) IsEmpty() (bool, error)
- func (repo *Remote) LatestBranchCommit(branch string) (string, error)
- func (repo *Remote) RemoteBranchesList() ([]string, error)
- func (repo *Remote) RemoteOriginUrl() (string, error)
- func (repo *Remote) TagCommit(tag string) (string, error)
- func (repo *Remote) TagsList() ([]string, error)
Constants ¶
View Source
const GIT_WORKTREE_CACHE_VERSION = "1"
View Source
const RemoteGitRepoCacheVersion = 4
Variables ¶
This section is empty.
Functions ¶
func GetBaseWorkTreeDir ¶
func GetBaseWorkTreeDir() string
Types ¶
type Archive ¶
type Archive interface {
GetFilePath() string
GetType() ArchiveType
IsEmpty() bool
}
type ArchiveFile ¶
type ArchiveFile struct {
FilePath string
Descriptor *true_git.ArchiveDescriptor
}
func NewTmpArchiveFile ¶
func NewTmpArchiveFile() *ArchiveFile
func (*ArchiveFile) GetFilePath ¶
func (a *ArchiveFile) GetFilePath() string
func (*ArchiveFile) GetType ¶
func (a *ArchiveFile) GetType() ArchiveType
func (*ArchiveFile) IsEmpty ¶
func (a *ArchiveFile) IsEmpty() bool
type ArchiveOptions ¶
type ArchiveOptions struct {
FilterOptions
Commit string
}
type ArchiveType ¶
type ArchiveType string
const ( FileArchive ArchiveType = "file" DirectoryArchive ArchiveType = "directory" )
type ChecksumDescriptor ¶
func (*ChecksumDescriptor) GetNoMatchPaths ¶
func (c *ChecksumDescriptor) GetNoMatchPaths() []string
func (*ChecksumDescriptor) String ¶
func (c *ChecksumDescriptor) String() string
type ChecksumOptions ¶
type ChecksumOptions struct {
FilterOptions
Paths []string
Commit string
}
type FilterOptions ¶
type GitRepo ¶
type GitRepo interface {
String() string
GetName() string
IsEmpty() (bool, error)
HeadCommit() (string, error)
LatestBranchCommit(branch string) (string, error)
TagCommit(tag string) (string, error)
IsCommitExists(commit string) (bool, error)
FindCommitIdByMessage(regex string) (string, error)
CreatePatch(PatchOptions) (Patch, error)
CreateArchive(ArchiveOptions) (Archive, error)
Checksum(ChecksumOptions) (Checksum, error)
}
TODO: This is interface for build pkg only -- should be renamed. Do not add operations that are not designed for build pkg usage.
type Local ¶
func (*Local) CreateArchive ¶
func (repo *Local) CreateArchive(opts ArchiveOptions) (Archive, error)
func (*Local) CreatePatch ¶
func (repo *Local) CreatePatch(opts PatchOptions) (Patch, error)
func (*Local) FindCommitIdByMessage ¶
func (*Local) GetCurrentBranchName ¶
func (*Local) GetCurrentTagName ¶
func (*Local) GetHeadCommit ¶
func (*Local) HeadBranchName ¶
func (*Local) HeadCommit ¶
func (*Local) IsBranchState ¶
func (*Local) IsTagState ¶
func (*Local) RemoteBranchesList ¶
func (*Local) RemoteOriginUrl ¶
type PatchFile ¶
type PatchFile struct {
FilePath string
Descriptor *true_git.PatchDescriptor
}
func NewTmpPatchFile ¶
func NewTmpPatchFile() *PatchFile
func (*PatchFile) GetBinaryPaths ¶
func (*PatchFile) GetFilePath ¶
type PatchOptions ¶
type PatchOptions struct {
FilterOptions
FromCommit, ToCommit string
WithEntireFileContext bool
WithBinary bool
}
type Remote ¶
type Remote struct {
Base
Url string
ClonePath string // TODO: move CacheVersion & path construction here
IsDryRun bool
}
func (*Remote) CloneAndFetch ¶
func (*Remote) CreateArchive ¶
func (repo *Remote) CreateArchive(opts ArchiveOptions) (Archive, error)
func (*Remote) CreatePatch ¶
func (repo *Remote) CreatePatch(opts PatchOptions) (Patch, error)
func (*Remote) FindCommitIdByMessage ¶
func (*Remote) HeadBranchName ¶
func (*Remote) HeadCommit ¶
func (*Remote) LatestBranchCommit ¶
func (*Remote) RemoteBranchesList ¶
func (*Remote) RemoteOriginUrl ¶
Click to show internal directories.
Click to hide internal directories.