Documentation
¶
Overview ¶
Package repolayout records the on-disk contract for Git repository data. Upgrades may add files under the extensions directory. They must not move or rewrite bare repositories, Git objects, refs, or LFS object bytes.
Index ¶
Constants ¶
const ( // Version is the layout contract implemented by this binary. Version = 1 // ContractGitObjectsImmutable is the only accepted contract name. ContractGitObjectsImmutable = "git-objects-immutable" // RoleRepositories is the frozen bare-repository tree. RoleRepositories = "git-repositories" // RoleLFS is the frozen Git LFS object store. RoleLFS = "git-lfs" // RoleDatabase is the frozen application database location. RoleDatabase = "database" )
Variables ¶
var ErrFutureLayout = errors.New("git layout is newer than this gitsss version")
ErrFutureLayout means a newer gitsss already recorded a layout this binary does not understand. Callers must stop without changing Git or LFS data.
Functions ¶
func ExtensionsPath ¶
ExtensionsPath returns the directory future upgrades may populate.
func ManifestPath ¶
ManifestPath returns the sidecar path under the application data root.
func RequiredFrozen ¶
func RequiredFrozen() []string
RequiredFrozen returns the role names every layout v1 file must contain.
func ReserveExtension ¶
ReserveExtension records an additive feature directory. The id is a single path segment. The returned directory is always inside the extensions tree.
Types ¶
type Manifest ¶
type Manifest struct {
LayoutVersion int `json:"layout_version"`
Contract string `json:"contract"`
Frozen []string `json:"frozen"`
ExtensionsDir string `json:"extensions_dir"`
Reserved map[string]string `json:"reserved,omitempty"`
}
Manifest is the sidecar stored beside repository data.