Versions in this module Expand all Collapse all v0 v0.0.2 Apr 15, 2024 Changes in this version + var ErrObjectNotFound = errors.New("object not found") + var ErrStopForEach = errors.New("stop for each loop") + var ErrTreeNodeNotFound = errors.New("node not found") + type AnnotatedTag interface + Commit func() Hash + Hash func() Hash + Message func() string + Name func() string + Tagger func() Ident + type CheckedOutBranchOption func(*checkedOutBranchOpts) + func CheckedOutBranchWithRemote(remoteName string) CheckedOutBranchOption + type CloneToBucketOptions struct + Mapper storage.Mapper + Name Name + RecurseSubmodules bool + type Cloner interface + CloneToBucket func(ctx context.Context, envContainer app.EnvContainer, url string, depth uint32, ...) error + func NewCloner(logger *zap.Logger, storageosProvider storageos.Provider, ...) Cloner + type ClonerOptions struct + HTTPSPasswordEnvKey string + HTTPSUsernameEnvKey string + SSHKeyFileEnvKey string + SSHKnownHostsFilesEnvKey string + type Commit interface + Author func() Ident + Committer func() Ident + Hash func() Hash + Message func() string + Parents func() []Hash + String func() string + Tree func() Hash + type ForEachBranchOption func(*forEachBranchOpts) + func ForEachBranchWithRemote(remoteName string) ForEachBranchOption + type ForEachCommitOption func(*forEachCommitOpts) + func ForEachCommitWithBranchStartPoint(branchName string, options ...ForEachCommitWithBranchStartPointOption) ForEachCommitOption + func ForEachCommitWithHashStartPoint(hash string) ForEachCommitOption + type ForEachCommitWithBranchStartPointOption func(*forEachCommitWithBranchStartPointOpts) + func ForEachCommitWithBranchStartPointWithRemote(remoteName string) ForEachCommitWithBranchStartPointOption + type HEADCommitOption func(*headCommitOpts) + func HEADCommitWithBranch(branchName string) HEADCommitOption + func HEADCommitWithRemote(remoteName string) HEADCommitOption + type Hash interface + Hex func() string + String func() string + func NewHashFromHex(value string) (Hash, error) + type Ident interface + Email func() string + Name func() string + Timestamp func() time.Time + type ListFilesAndUnstagedFilesOptions struct + IgnorePathRegexps []*regexp.Regexp + type Lister interface + ListFilesAndUnstagedFiles func(ctx context.Context, envContainer app.EnvStdioContainer, ...) ([]string, error) + func NewLister(runner command.Runner) Lister + type Name interface + func NewBranchName(branch string) Name + func NewRefName(ref string) Name + func NewRefNameWithBranch(ref string, branch string) Name + func NewTagName(tag string) Name + type ObjectMode uint32 + const DotGitDir + const ModeDir + const ModeExe + const ModeFile + const ModeSubmodule + const ModeSymlink + const ModeUnknown + type ObjectReader interface + Blob func(id Hash) ([]byte, error) + Commit func(id Hash) (Commit, error) + Tag func(id Hash) (AnnotatedTag, error) + Tree func(id Hash) (Tree, error) + type OpenRepositoryOption func(*openRepositoryOpts) error + func OpenRepositoryWithDefaultBranch(name string) OpenRepositoryOption + type Repository interface + CheckedOutBranch func(options ...CheckedOutBranchOption) (string, error) + Close func() error + DefaultBranch func() string + ForEachBranch func(f func(branch string, headHash Hash) error, options ...ForEachBranchOption) error + ForEachCommit func(f func(commit Commit) error, options ...ForEachCommitOption) error + ForEachTag func(func(tag string, commitHash Hash) error) error + HEADCommit func(options ...HEADCommitOption) (Commit, error) + Objects func() ObjectReader + func OpenRepository(ctx context.Context, gitDirPath string, runner command.Runner, ...) (Repository, error) + type Tree interface + Descendant func(path string, objectReader ObjectReader) (TreeNode, error) + Hash func() Hash + Nodes func() []TreeNode + type TreeNode interface + Hash func() Hash + Mode func() ObjectMode + Name func() string