Documentation ¶
Index ¶
- func DebouncedSwitchProject(name string)
- func FromSubject(s string) string
- type PatchManager
- func (m PatchManager) ApplyCmd(p models.Project) (string, error)
- func (m PatchManager) ApplyUpdate(p models.Project, patch, commitID string, kv map[string]string) (models.Project, error)
- func (m PatchManager) Clean(p models.Project) bool
- func (m PatchManager) CreateWorktree(p models.Project, commitID, tag string) (models.Project, error)
- func (m PatchManager) CurrentPatches() ([]string, error)
- func (m PatchManager) CurrentProject() (p models.Project, err error)
- func (m PatchManager) DropPatch(patch string) error
- func (m PatchManager) Find(hash string, p models.Project) (models.Commit, error)
- func (m PatchManager) Head(p models.Project) (string, error)
- func (m PatchManager) Init(name, path string, overwrite bool) error
- func (m PatchManager) Names() ([]string, error)
- func (m PatchManager) NewReader(projects []models.Project) io.Reader
- func (m PatchManager) Projects(name string) ([]models.Project, error)
- func (m PatchManager) RebaseCommits(p models.Project, baseID string) ([]models.Commit, error)
- func (m PatchManager) SaveRebased(p models.Project, baseID string, commits []models.Commit) error
- func (m PatchManager) SwitchProject(name string) error
- func (m PatchManager) Unlink(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebouncedSwitchProject ¶
func DebouncedSwitchProject(name string)
func FromSubject ¶
Types ¶
type PatchManager ¶
type PatchManager struct {
// contains filtered or unexported fields
}
func FromFunc ¶
func FromFunc(d detectFn, r rcFn, s storeFn) PatchManager
func New ¶
func New() PatchManager
func (PatchManager) ApplyUpdate ¶
func (m PatchManager) ApplyUpdate(p models.Project, patch, commitID string, kv map[string]string, ) (models.Project, error)
ApplyUpdate is called after the commits have been applied with the ApplyCmd(). It will determine the additional commits from the commitID (last HEAD position), assign the patch tag to those commits and store them in project p.
func (PatchManager) CreateWorktree ¶
func (PatchManager) CurrentPatches ¶
func (m PatchManager) CurrentPatches() ([]string, error)
func (PatchManager) CurrentProject ¶
func (m PatchManager) CurrentProject() (p models.Project, err error)
func (PatchManager) DropPatch ¶
func (m PatchManager) DropPatch(patch string) error
func (PatchManager) Init ¶
func (m PatchManager) Init(name, path string, overwrite bool) error
Init creats a new revision control project
func (PatchManager) Names ¶
func (m PatchManager) Names() ([]string, error)
func (PatchManager) NewReader ¶
func (m PatchManager) NewReader(projects []models.Project) io.Reader
func (PatchManager) Projects ¶
func (m PatchManager) Projects(name string) ([]models.Project, error)
func (PatchManager) RebaseCommits ¶
RebaseCommits fetches the commits between baseID and HEAD. The tags from the current project will be mapped onto the fetched commits based on either the commit hash or the commit subject.
func (PatchManager) SaveRebased ¶
SaveRebased checks if the commits actually exist in the repo, repopulate the info fields and saves the baseID for project p.
func (PatchManager) SwitchProject ¶
func (m PatchManager) SwitchProject(name string) error
func (PatchManager) Unlink ¶
func (m PatchManager) Unlink(name string) error
Unlink removes provided project
Source Files ¶
Click to show internal directories.
Click to hide internal directories.