Documentation ¶
Overview ¶
Package core contains wrapper structs for the git package resources
Package core contains wrapper structs for the git package resources
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRepository ¶
type GitRepository struct {
Repository *git.Repository
}
GitRepository is a wrapper for git.Repository and implements IGitRepository
func NewGitRepository ¶
func NewGitRepository(repository *git.Repository) *GitRepository
NewGitRepository creates a new GitRepository object
func (*GitRepository) Worktree ¶
func (repository *GitRepository) Worktree() (gitWorktree IGitWorktree, err error)
Worktree returns the worktree of the repository
type GitWorktree ¶
type GitWorktree struct {
Worktree *git.Worktree
}
GitWorktree is a wrapper for git.Worktree and implements IGitWorktree
func (*GitWorktree) Checkout ¶
func (gitWorktree *GitWorktree) Checkout(opts *git.CheckoutOptions) error
Checkout performs the git checkout operation based on the given options
type IGitRepository ¶
type IGitRepository interface {
Worktree() (gitWorktree IGitWorktree, err error)
}
IGitRepository defines a subset of git.Repository methods required to clone/checkout a git repository
type IGitWorktree ¶
type IGitWorktree interface {
Checkout(opts *git.CheckoutOptions) error
}
IGitWorktree defines a subset of git.Worktree methods required to clone/checkout a git repository
func NewGitWorktree ¶
func NewGitWorktree(gitRepository *GitRepository) (gitWorktree IGitWorktree, err error)
NewGitWorktree creates a new GitWorktree object