Documentation
¶
Index ¶
- Constants
- type Mock
- func (m *Mock) Clone(_ context.Context, path, repo string, isBare bool, progress terminal.Spinner) error
- func (m *Mock) CommitObject(h plumbing.Hash) (*object.Commit, error)
- func (m *Mock) Head() (*plumbing.Reference, error)
- func (m *Mock) Open(path string) error
- func (m *Mock) Pull(_ context.Context, worktree *git.Worktree) error
- func (m *Mock) Worktree() (*git.Worktree, error)
- type Repository
Constants ¶
View Source
const ( // DefaultRemoteName will provide default origin. DefaultRemoteName = git.DefaultRemoteName )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
Mock impl of Repository interface
func (*Mock) Clone ¶
func (m *Mock) Clone(_ context.Context, path, repo string, isBare bool, progress terminal.Spinner) error
Clone mock
func (*Mock) CommitObject ¶
CommitObject mock
type Repository ¶
type Repository interface {
Open(path string) error
Clone(ctx context.Context, path, repo string, isBare bool, progress terminal.Spinner) error
Pull(ctx context.Context, worktree *git.Worktree) error
Head() (*plumbing.Reference, error)
Worktree() (*git.Worktree, error)
CommitObject(h plumbing.Hash) (*object.Commit, error)
}
Repository interface.
func NewRepository ¶
func NewRepository() Repository
NewRepository will initialize new git integrations instance.
Click to show internal directories.
Click to hide internal directories.