Documentation ¶
Index ¶
- Constants
- func GetGitRepoCacheDir() string
- func GetWorkTreeCacheDir() string
- func GitOpenWithCustomWorktreeDir(gitDir string, worktreeDir string) (*git.Repository, error)
- 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 Checksum, err 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) IsAncestor(ancestorCommit, descendantCommit string) (bool, 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 Checksum, err 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) GetClonePath() string
- func (repo *Remote) HeadBranchName() (string, error)
- func (repo *Remote) HeadCommit() (string, error)
- func (repo *Remote) IsAncestor(ancestorCommit, descendantCommit string) (bool, 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 GitRepoCacheVersion = "1"
View Source
const GitWorkTreeCacheVersion = "3"
Variables ¶
This section is empty.
Functions ¶
func GetGitRepoCacheDir ¶
func GetGitRepoCacheDir() string
func GetWorkTreeCacheDir ¶
func GetWorkTreeCacheDir() string
func GitOpenWithCustomWorktreeDir ¶ added in v1.1.0
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) IsAncestor(ancestorCommit, descendantCommit string) (bool, 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) Checksum ¶
func (repo *Local) Checksum(opts ChecksumOptions) (checksum Checksum, err error)
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) IsAncestor ¶ added in v1.1.0
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 ¶
func (*Remote) Checksum ¶
func (repo *Remote) Checksum(opts ChecksumOptions) (checksum Checksum, err error)
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) GetClonePath ¶
func (*Remote) HeadBranchName ¶
func (*Remote) HeadCommit ¶
func (*Remote) IsAncestor ¶ added in v1.1.0
func (*Remote) LatestBranchCommit ¶
func (*Remote) RemoteBranchesList ¶
func (*Remote) RemoteOriginUrl ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.