Documentation ¶
Index ¶
- Constants
- func GetGitRepoCacheDir() string
- func GetWorkTreeCacheDir() string
- func HasSubmodulesInCommit(commit *object.Commit) (bool, error)
- type Archive
- type ArchiveFile
- type ArchiveOptions
- type ArchiveType
- type Base
- func (repo *Base) GetName() string
- func (repo *Base) HeadCommit(ctx context.Context) (string, error)
- func (repo *Base) LatestBranchCommit(ctx context.Context, branch string) (string, error)
- func (repo *Base) String() string
- func (repo *Base) TagCommit(ctx context.Context, branch string) (string, error)
- type Checksum
- type ChecksumDescriptor
- type ChecksumOptions
- type FilterOptions
- type GitRepo
- type Local
- func (repo *Local) CheckIgnore(ctx context.Context, paths []string) (*check_ignore.Result, error)
- func (repo *Local) Checksum(ctx context.Context, opts ChecksumOptions) (checksum Checksum, err error)
- func (repo *Local) CreateArchive(ctx context.Context, opts ArchiveOptions) (Archive, error)
- func (repo *Local) CreateDetachedMergeCommit(ctx context.Context, fromCommit, toCommit string) (string, error)
- func (repo *Local) CreatePatch(ctx context.Context, opts PatchOptions) (Patch, error)
- func (repo *Local) FetchOrigin(ctx context.Context) error
- func (repo *Local) GetMergeCommitParents(_ context.Context, commit string) ([]string, error)
- func (repo *Local) HeadCommit(ctx context.Context) (string, error)
- func (repo *Local) IsAncestor(_ context.Context, ancestorCommit, descendantCommit string) (bool, error)
- func (repo *Local) IsCommitExists(ctx context.Context, commit string) (bool, error)
- func (repo *Local) IsEmpty(ctx context.Context) (bool, error)
- func (repo *Local) IsHeadReferenceExist(ctx context.Context) (bool, error)
- func (repo *Local) IsShallowClone() (bool, error)
- func (repo *Local) LsTree(ctx context.Context, pathMatcher path_matcher.PathMatcher, opts LsTreeOptions) (*ls_tree.Result, error)
- func (repo *Local) PlainOpen() (*git.Repository, error)
- func (repo *Local) RemoteBranchesList(ctx context.Context) ([]string, error)
- func (repo *Local) RemoteOriginUrl(ctx context.Context) (string, error)
- func (repo *Local) Status(ctx context.Context, pathMatcher path_matcher.PathMatcher) (*status.Result, error)
- func (repo *Local) SyncWithOrigin(ctx context.Context) error
- func (repo *Local) TagsList(ctx context.Context) ([]string, error)
- type LsTreeOptions
- type Patch
- type PatchFile
- type PatchOptions
- type Remote
- func (repo *Remote) Checksum(ctx context.Context, opts ChecksumOptions) (checksum Checksum, err error)
- func (repo *Remote) Clone(ctx context.Context) (bool, error)
- func (repo *Remote) CloneAndFetch(ctx context.Context) error
- func (repo *Remote) CreateArchive(ctx context.Context, opts ArchiveOptions) (Archive, error)
- func (repo *Remote) CreateDetachedMergeCommit(ctx context.Context, fromCommit, toCommit string) (string, error)
- func (repo *Remote) CreatePatch(ctx context.Context, opts PatchOptions) (Patch, error)
- func (repo *Remote) Fetch(ctx context.Context) error
- func (repo *Remote) GetClonePath() string
- func (repo *Remote) GetMergeCommitParents(_ context.Context, commit string) ([]string, error)
- func (repo *Remote) HeadCommit(_ context.Context) (string, error)
- func (repo *Remote) IsAncestor(ctx context.Context, ancestorCommit, descendantCommit string) (bool, error)
- func (repo *Remote) IsCommitExists(ctx context.Context, commit string) (bool, error)
- func (repo *Remote) IsEmpty(ctx context.Context) (bool, error)
- func (repo *Remote) LatestBranchCommit(ctx context.Context, branch string) (string, error)
- func (repo *Remote) RemoteBranchesList(_ context.Context) ([]string, error)
- func (repo *Remote) RemoteOriginUrl() (string, error)
- func (repo *Remote) TagCommit(ctx context.Context, tag string) (string, error)
- func (repo *Remote) TagsList(_ context.Context) ([]string, error)
- func (repo *Remote) ValidateEndpoint() error
Constants ¶
View Source
const GitRepoCacheVersion = "3"
View Source
const GitWorkTreeCacheVersion = "6"
Variables ¶
This section is empty.
Functions ¶
func GetGitRepoCacheDir ¶
func GetGitRepoCacheDir() string
func GetWorkTreeCacheDir ¶
func GetWorkTreeCacheDir() 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 Base ¶
func (*Base) LatestBranchCommit ¶
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(ctx context.Context) (bool, error) HeadCommit(ctx context.Context) (string, error) LatestBranchCommit(ctx context.Context, branch string) (string, error) TagCommit(ctx context.Context, tag string) (string, error) IsCommitExists(ctx context.Context, commit string) (bool, error) IsAncestor(ctx context.Context, ancestorCommit, descendantCommit string) (bool, error) GetMergeCommitParents(ctx context.Context, commit string) ([]string, error) CreateDetachedMergeCommit(ctx context.Context, fromCommit, toCommit string) (string, error) CreatePatch(context.Context, PatchOptions) (Patch, error) CreateArchive(context.Context, ArchiveOptions) (Archive, error) Checksum(context.Context, ChecksumOptions) (Checksum, error) }
type Local ¶
func (*Local) CheckIgnore ¶
func (*Local) CreateArchive ¶
func (*Local) CreateDetachedMergeCommit ¶
func (*Local) CreatePatch ¶
func (*Local) FetchOrigin ¶ added in v1.1.23
func (*Local) GetMergeCommitParents ¶
func (*Local) IsAncestor ¶
func (*Local) IsCommitExists ¶
func (*Local) IsHeadReferenceExist ¶
func (*Local) IsShallowClone ¶
func (*Local) LsTree ¶
func (repo *Local) LsTree(ctx context.Context, pathMatcher path_matcher.PathMatcher, opts LsTreeOptions) (*ls_tree.Result, error)
func (*Local) RemoteBranchesList ¶
func (*Local) RemoteOriginUrl ¶
func (*Local) Status ¶
func (repo *Local) Status(ctx context.Context, pathMatcher path_matcher.PathMatcher) (*status.Result, error)
func (*Local) SyncWithOrigin ¶ added in v1.1.23
type LsTreeOptions ¶
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 OpenRemoteRepo ¶
func (*Remote) CreateArchive ¶
func (*Remote) CreateDetachedMergeCommit ¶
func (*Remote) CreatePatch ¶
func (*Remote) GetClonePath ¶
func (*Remote) GetMergeCommitParents ¶
func (*Remote) IsAncestor ¶
func (*Remote) IsCommitExists ¶
func (*Remote) LatestBranchCommit ¶
func (*Remote) RemoteBranchesList ¶
func (*Remote) RemoteOriginUrl ¶
func (*Remote) ValidateEndpoint ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.