Documentation
¶
Index ¶
- Variables
- type DiffLayer
- type FileDiff
- type FileStatus
- type GitBranch
- type GitFileStatus
- type GitStatus
- type Manager
- func (m *Manager) Branches(ctx context.Context, refresh bool) ([]GitBranch, string, error)
- func (m *Manager) CheckoutBranch(ctx context.Context, name, remote string) error
- func (m *Manager) Close()
- func (m *Manager) Commit(ctx context.Context, message string) (string, error)
- func (m *Manager) CreateBranch(ctx context.Context, name string) error
- func (m *Manager) Diff(ctx context.Context, path string, layer DiffLayer) (FileDiff, error)
- func (m *Manager) Diffs(ctx context.Context) ([]FileDiff, error)
- func (m *Manager) Fingerprint(ctx context.Context) uint64
- func (m *Manager) GitStatus(ctx context.Context) (GitStatus, error)
- func (m *Manager) IsNativeGit() bool
- func (m *Manager) Pull(ctx context.Context) (string, error)
- func (m *Manager) Push(ctx context.Context) (string, error)
- func (m *Manager) Revert(ctx context.Context, path string) error
- func (m *Manager) Stage(ctx context.Context, paths []string) error
- func (m *Manager) Unstage(ctx context.Context, paths []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("change tracker closed")
View Source
var ErrDirtyWorktree = errors.New("local changes can only move between branches at the same commit; clean the worktree before switching to a divergent branch")
View Source
var ErrNoDiff = errors.New("diff not found")
View Source
var ErrNotGitRepository = errors.New("workspace is not a Git repository")
Functions ¶
This section is empty.
Types ¶
type FileDiff ¶
type FileDiff struct {
Path string
Status FileStatus
Patch string
Original string
Modified string
}
type FileStatus ¶
type FileStatus int
const ( StatusAdded FileStatus = iota StatusModified StatusDeleted )
type GitFileStatus ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CheckoutBranch ¶
func (*Manager) CreateBranch ¶
func (*Manager) IsNativeGit ¶
Click to show internal directories.
Click to hide internal directories.