Documentation ¶
Index ¶
- Constants
- Variables
- func Archive(ctx context.Context, out io.Writer, gitDir, workTreeCacheDir string, ...) error
- func ArchiveWithSubmodules(ctx context.Context, out io.Writer, gitDir, workTreeCacheDir string, ...) error
- func CreateDetachedMergeCommit(ctx context.Context, ...) (string, error)
- func Fetch(ctx context.Context, path string, options FetchOptions) error
- func GetLastBranchCommitSHA(ctx context.Context, repoPath, branch string) (string, error)
- func GitOpenWithCustomWorktreeDir(gitDir, worktreeDir string) (*git.Repository, error)
- func Init(ctx context.Context, opts Options) error
- func IsAncestor(ctx context.Context, ancestorCommit, descendantCommit string, gitDir string) (bool, error)
- func IsShallowClone(ctx context.Context, path string) (bool, error)
- func IsValidGitDir(ctx context.Context, gitDir string) (bool, error)
- func IsValidWorkTree(ctx context.Context, workTree string) (bool, error)
- func ResolveRepoDir(ctx context.Context, repoDir string) (string, error)
- func SyncSourceWorktreeWithServiceBranch(ctx context.Context, ...) (string, error)
- func UpwardLookupAndVerifyWorkTree(ctx context.Context, lookupPath string) (bool, string, error)
- func WithWorkTree(ctx context.Context, gitDir, workTreeCacheDir string, commit string, ...) error
- type ArchiveOptions
- type CreateDetachedMergeCommitOptions
- type FetchOptions
- type GitCmd
- type GitCmdOptions
- type Options
- type PatchDescriptor
- type PatchOptions
- type RefDescriptor
- type ShowRefResult
- type SyncSourceWorktreeWithServiceBranchOptions
- type WithWorkTreeOptions
- type WorktreeDescriptor
Constants ¶
View Source
const (
MinGitVersionConstraintValue = "2.18"
)
Variables ¶
View Source
var ForbiddenGitVersionsConstraintValues = []string{"2.22.0"}
Functions ¶
func ArchiveWithSubmodules ¶
func GetLastBranchCommitSHA ¶ added in v1.2.64
func IsAncestor ¶
func IsValidGitDir ¶ added in v1.2.5
func IsValidWorkTree ¶ added in v1.2.5
func ResolveRepoDir ¶ added in v1.2.5
func SyncSourceWorktreeWithServiceBranch ¶ added in v1.2.13
func UpwardLookupAndVerifyWorkTree ¶ added in v1.2.5
func WithWorkTree ¶
Types ¶
type ArchiveOptions ¶
type ArchiveOptions struct { Commit string PathScope string // Determines the directory that will get into the result (similar to <pathspec> in the git commands). PathMatcher path_matcher.PathMatcher FileRenames map[string]string // Files to rename during archiving. Git repo relative paths of original files as keys, new filenames (without base path) as values. }
func (ArchiveOptions) ID ¶ added in v1.2.11
func (opts ArchiveOptions) ID() string
TODO: 1.3 add git mapping type (dir, file, ...) to gitArchive stage digest
type CreateDetachedMergeCommitOptions ¶
type CreateDetachedMergeCommitOptions struct {
HasSubmodules bool
}
type FetchOptions ¶
type GitCmd ¶ added in v1.2.57
type GitCmd struct { *exec.Cmd // We always write to all of these buffs, unlike with exec.Cmd.Stdout(Stderr) OutBuf *bytes.Buffer ErrBuf *bytes.Buffer OutErrBuf *bytes.Buffer }
type GitCmdOptions ¶ added in v1.2.57
type GitCmdOptions struct {
RepoDir string
}
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 { PathScope string // Determines the directory that will get into the result (similar to <pathspec> in the git commands). PathMatcher path_matcher.PathMatcher FromCommit, ToCommit string FileRenames map[string]string // Files to rename during patching. Git repo relative paths of original files as keys, new filenames (without base path) as values. WithEntireFileContext bool WithBinary bool }
func (PatchOptions) ID ¶ added in v1.2.11
func (opts PatchOptions) ID() string
type RefDescriptor ¶
type ShowRefResult ¶
type ShowRefResult struct {
Refs []RefDescriptor
}
type SyncSourceWorktreeWithServiceBranchOptions ¶ added in v1.2.13
type WithWorkTreeOptions ¶
type WithWorkTreeOptions struct {
HasSubmodules bool
}
type WorktreeDescriptor ¶
func GetWorkTreeList ¶
func GetWorkTreeList(ctx context.Context, repoDir string) ([]WorktreeDescriptor, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.