1
This commit is contained in:
@@ -31,6 +31,19 @@ func (c *Config) RepoRoot() string {
|
||||
return filepath.Join(c.Root, "repos")
|
||||
}
|
||||
|
||||
// TemplateDir is the `git init --template` source: <root>/template. The daemon
|
||||
// materializes it at startup (hooks.EnsureTemplate) so every CreateRepo gets
|
||||
// forwarding hooks. CreateRepo falls back to plain `git init --bare` if absent.
|
||||
func (c *Config) TemplateDir() string {
|
||||
return filepath.Join(c.Root, "template")
|
||||
}
|
||||
|
||||
// HookSock is the unix socket the hook bus listens on: <root>/hook.sock. Hook
|
||||
// scripts dial it (via `simplegit hook --root=...`) to forward invocations.
|
||||
func (c *Config) HookSock() string {
|
||||
return filepath.Join(c.Root, "hook.sock")
|
||||
}
|
||||
|
||||
// Prepare checks that the config is valid and creates the repo root if needed.
|
||||
func (c *Config) Prepare() error {
|
||||
if c.prepared.Load() {
|
||||
|
||||
Reference in New Issue
Block a user