Documentation
¶
Index ¶
- Constants
- Variables
- func CreateDetachedMergeCommit(gitDir, workTreeCacheDir, commitToMerge, mergeIntoCommit string, ...) (string, error)
- func GetRealRepoDir(repoDir string) (string, error)
- func GitOpenWithCustomWorktreeDir(gitDir, worktreeDir string) (*git.Repository, error)
- func Init(opts Options) error
- func IsAncestor(ancestorCommit, descendantCommit string, gitDir string) (bool, error)
- func WithWorkTree(gitDir, workTreeCacheDir string, commit string, opts WithWorkTreeOptions, ...) error
- type ArchiveDescriptor
- type ArchiveOptions
- type ArchiveType
- type CreateDetachedMergeCommitOptions
- type Options
- type PatchDescriptor
- type PatchOptions
- type RefDescriptor
- type ShowRefResult
- type WithWorkTreeOptions
- type WorktreeDescriptor
Constants ¶
View Source
const ( MinGitVersionConstraintValue = "1.9" MinGitVersionWithSubmodulesConstraintValue = "2.14" )
Variables ¶
View Source
var (
ForbiddenGitVersionsConstraintValues = []string{"2.22.0"}
)
Functions ¶
func CreateDetachedMergeCommit ¶ added in v1.1.17
func CreateDetachedMergeCommit(gitDir, workTreeCacheDir, commitToMerge, mergeIntoCommit string, opts CreateDetachedMergeCommitOptions) (string, error)
func GetRealRepoDir ¶
func GitOpenWithCustomWorktreeDir ¶ added in v1.1.19
func IsAncestor ¶ added in v1.1.0
func WithWorkTree ¶
Types ¶
type ArchiveDescriptor ¶
type ArchiveDescriptor struct { Type ArchiveType IsEmpty bool }
func Archive ¶
func Archive(out io.Writer, gitDir, workTreeCacheDir string, opts ArchiveOptions) (*ArchiveDescriptor, error)
func ArchiveWithSubmodules ¶
func ArchiveWithSubmodules(out io.Writer, gitDir, workTreeCacheDir string, opts ArchiveOptions) (*ArchiveDescriptor, error)
type ArchiveOptions ¶
type ArchiveOptions struct { Commit string PathMatcher path_matcher.PathMatcher }
type ArchiveType ¶
type ArchiveType string
const ( FileArchive ArchiveType = "file" DirectoryArchive ArchiveType = "directory" )
type CreateDetachedMergeCommitOptions ¶ added in v1.1.17
type CreateDetachedMergeCommitOptions struct {
HasSubmodules bool
}
type PatchDescriptor ¶
func Patch ¶
func Patch(out io.Writer, gitDir string, opts PatchOptions) (*PatchDescriptor, error)
func PatchWithSubmodules ¶
func PatchWithSubmodules(out io.Writer, gitDir, workTreeCacheDir string, opts PatchOptions) (*PatchDescriptor, error)
type PatchOptions ¶
type PatchOptions struct {
FromCommit, ToCommit string
PathMatcher path_matcher.PathMatcher
WithEntireFileContext bool
WithBinary bool
}
type RefDescriptor ¶ added in v1.1.19
type ShowRefResult ¶ added in v1.1.19
type ShowRefResult struct {
Refs []RefDescriptor
}
func ShowRef ¶ added in v1.1.19
func ShowRef(repoDir string) (*ShowRefResult, error)
type WithWorkTreeOptions ¶
type WithWorkTreeOptions struct {
HasSubmodules bool
}
type WorktreeDescriptor ¶ added in v1.1.19
func GetWorkTreeList ¶ added in v1.1.19
func GetWorkTreeList(repoDir string) ([]WorktreeDescriptor, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.