Documentation
¶
Index ¶
- Constants
- Variables
- func CreateDetachedMergeCommit(ctx context.Context, ...) (string, error)
- func Fetch(ctx context.Context, path string, options FetchOptions) error
- func GitOpenWithCustomWorktreeDir(gitDir, worktreeDir string) (*git.Repository, error)
- func Init(opts Options) error
- func IsAncestor(ancestorCommit, descendantCommit string, gitDir string) (bool, error)
- func IsShallowClone(path string) (bool, error)
- func IsValidGitDir(gitDir string) (bool, error)
- func IsValidWorkTree(workTree string) (bool, error)
- func ResolveRepoDir(repoDir string) (string, error)
- func SetCommandRecordingLiveOutput(ctx context.Context, cmd *exec.Cmd) *bytes.Buffer
- func SyncDevBranchWithStagedFiles(ctx context.Context, gitDir, workTreeCacheDir, commit string) (string, error)
- func UpwardLookupAndVerifyWorkTree(lookupPath string) (bool, string, error)
- func WithWorkTree(ctx context.Context, gitDir, workTreeCacheDir string, commit string, ...) error
- type ArchiveDescriptor
- type ArchiveOptions
- type ArchiveType
- type CreateDetachedMergeCommitOptions
- type FetchOptions
- type Options
- type PatchDescriptor
- type PatchOptions
- type RefDescriptor
- type ShowRefResult
- type WithWorkTreeOptions
- type WorktreeDescriptor
Constants ¶
View Source
const (
MinGitVersionConstraintValue = "2.18"
)
Variables ¶
View Source
var (
ForbiddenGitVersionsConstraintValues = []string{"2.22.0"}
)
Functions ¶
func GitOpenWithCustomWorktreeDir ¶
func GitOpenWithCustomWorktreeDir(gitDir, worktreeDir string) (*git.Repository, error)
func IsAncestor ¶
func IsShallowClone ¶
func IsValidGitDir ¶ added in v1.2.5
func IsValidWorkTree ¶ added in v1.2.5
func ResolveRepoDir ¶ added in v1.2.5
func SetCommandRecordingLiveOutput ¶ added in v1.2.8
func SyncDevBranchWithStagedFiles ¶ added in v1.2.3
func UpwardLookupAndVerifyWorkTree ¶ added in v1.2.5
func WithWorkTree ¶
Types ¶
type ArchiveDescriptor ¶
type ArchiveDescriptor struct {
Type ArchiveType
IsEmpty bool
}
func Archive ¶
func Archive(ctx context.Context, out io.Writer, gitDir, workTreeCacheDir string, opts ArchiveOptions) (*ArchiveDescriptor, error)
func ArchiveWithSubmodules ¶
func ArchiveWithSubmodules(ctx context.Context, 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 ¶
type CreateDetachedMergeCommitOptions struct {
HasSubmodules bool
}
type FetchOptions ¶
type PatchDescriptor ¶
func Patch ¶
func Patch(ctx context.Context, out io.Writer, gitDir string, opts PatchOptions) (*PatchDescriptor, error)
func PatchWithSubmodules ¶
func PatchWithSubmodules(ctx context.Context, 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 ¶
type ShowRefResult ¶
type ShowRefResult struct {
Refs []RefDescriptor
}
func ShowRef ¶
func ShowRef(repoDir string) (*ShowRefResult, error)
type WithWorkTreeOptions ¶
type WithWorkTreeOptions struct {
HasSubmodules bool
}
type WorktreeDescriptor ¶
func GetWorkTreeList ¶
func GetWorkTreeList(repoDir string) ([]WorktreeDescriptor, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.