Documentation ¶
Index ¶
- Constants
- Variables
- func GetRealRepoDir(repoDir string) (string, 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 FsckOptions
- type FsckResult
- type Options
- type PatchDescriptor
- type PatchOptions
- type PathFilter
- type WithWorkTreeOptions
Constants ¶
View Source
const ( MinGitVersionConstraintValue = "1.9" MinGitVersionWithSubmodulesConstraintValue = "2.14" )
Variables ¶
View Source
var (
ForbiddenGitVersionsConstraintValues = []string{"2.22.0"}
)
Functions ¶
func GetRealRepoDir ¶
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 PathFilter PathFilter }
type ArchiveType ¶
type ArchiveType string
const ( FileArchive ArchiveType = "file" DirectoryArchive ArchiveType = "directory" )
type FsckOptions ¶
type FsckResult ¶
type FsckResult struct {
UnreachableCommits []string
}
func Fsck ¶
func Fsck(repoDir string, opts FsckOptions) (FsckResult, error)
Fsck gives 'git fsck' output result
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
PathFilter PathFilter
WithEntireFileContext bool
WithBinary bool
}
type PathFilter ¶
type WithWorkTreeOptions ¶
type WithWorkTreeOptions struct {
HasSubmodules bool
}
Click to show internal directories.
Click to hide internal directories.