Documentation
¶
Overview ¶
Package gitops owns durable workspace Git writes. HTTP is only a caller and observer: losing a connection never cancels or replays an accepted operation.
Index ¶
- Constants
- Variables
- func ActionVersion(action string) int
- func Network(action string) bool
- func Normalize(spec *registry.GitSpec) error
- func Root(ctx context.Context, directory string) (string, error)
- func SameIntent(a, b registry.GitSpec) bool
- type Service
- func (s *Service) ActiveCount() int
- func (s *Service) BusyPath(path string) bool
- func (s *Service) Cancel(id string) (registry.GitOperation, error)
- func (s *Service) Changes() <-chan struct{}
- func (s *Service) Close()
- func (s *Service) Get(id string) (registry.GitOperation, error)
- func (s *Service) List(projectID string, activeOnly bool) ([]registry.GitOperation, error)
- func (s *Service) Start(spec registry.GitSpec, c *gitaccess.Connection, auth *gitaccess.Auth) (registry.GitOperation, error)
- func (s *Service) Wait(ctx context.Context, id string) (registry.GitOperation, error)
Constants ¶
const Version = 6
Version 6 supplies repository-scoped GitHub credentials to commit hooks.
Variables ¶
var ( ErrBranchChanged = errors.New("This branch changed or was removed. Refresh the branch list before trying again.") ErrBranchInUse = errors.New("This branch is checked out. Switch to another branch before deleting it; branches open in another worktree must be managed there.") ErrBranchUnmerged = errors.New("This branch has unmerged commits. Merge them first, or explicitly delete the unmerged branch.") )
var ( ErrRestoreDirty = errors.New("Commit or stash your local changes before restoring a version.") ErrRestoreChanged = errors.New("The current branch changed. Review it before restoring this version.") ErrRestoreInProgress = errors.New("Finish the current merge, rebase, or other Git operation before restoring a version.") ErrRestoreCommit = errors.New("This commit is no longer available. Refresh commit history and try again.") ErrRestoreLocalFiles = errors.New("Local ignored files would be replaced by this version. Move them before restoring.") )
var ErrIdentityRequired = errors.New("Set your Git author name and email before committing.")
Functions ¶
func ActionVersion ¶
ActionVersion describes the closed action enum, independently of optional fields.
func SameIntent ¶
SameIntent ignores the server-resolved directory: a project moved after a completed request must not cause that request's ID to execute a second time.