Documentation
¶
Overview ¶
Package repocontext manages per-repository context directories.
Index ¶
Constants ¶
const CanvasesDirName = "canvases"
CanvasesDirName is the entry Hive Desktop keeps a repository's canvases in. Prune leaves it alone: a canvas is durable output, and the age of its directory says nothing about whether it is still wanted.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages per-repository context directories.
func NewService ¶
NewService creates a new Service.
func (*Service) CreateSymlink ¶
CreateSymlink creates a symlink from the current directory to the context directory. Returns true if the symlink already existed and pointed to the correct target.
func (*Service) Init ¶
Init creates the context directory and standard subdirectories. Returns the list of subdirectories that were newly created.
func (*Service) Prune ¶
Prune deletes files in the context directory older than the given duration. Returns the number of files removed.
func (*Service) ResolveDir ¶
ResolveDir determines the context directory for the given repo spec. If repo is "owner/repo", it resolves directly. If shared is true, returns the shared dir. Otherwise detects from the current directory's git remote.