Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Status ¶
func Status(logger *zap.Logger, rebasing *vcsvcs.SturdyRebase) (*sync.RebaseStatusResponse, error)
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New( logger *zap.Logger, executorProvider executor.Provider, viewRepo db_view.Repository, workspaceReader db_workspace.WorkspaceReader, workspaceWriter db_workspace.WorkspaceWriter, snap snapshotter.Snapshotter, ) *Service
func (*Service) OnTrunk ¶
func (s *Service) OnTrunk(viewID string) (*sync.RebaseStatusResponse, error)
OnTrunk starts a sync of viewID on top of the current sturdytrunk If the work in progress changes on the view conflicts with trunk, a conflicting sync.RebaseStatusResponse is returned which has to be resolved by the user (see Resolve).
The current work in progress will be added to a commit, that is rebased on top of the trunk. After the syncing is done, the commit is "git reset --mixed HEAD^1"-ed, to restore it to the WIP.
func (*Service) Resolve ¶
func (s *Service) Resolve(viewID string, resolves []vcsvcs.SturdyRebaseResolve) (*sync.RebaseStatusResponse, error)
Resolve resolves the conflicts in viewID with the resolutions in resolves
For each conflicting file in the index, resolves contains the the file path and if the resolution should be * use the version from trunk * use the version from the workspace * use the current version of the file on disk (called "custom")