Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hooks.go « hooks « git « internal - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d7df23a8acc90f647ba4a8a1dc1bfccd56b5a217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package hooks

import (
	"path"

	"gitlab.com/gitlab-org/gitaly/internal/config"
)

// Override allows tests to control where the hooks directory is.
var Override string

// Path returns the path where the global git hooks are located.
func Path() string {
	if len(Override) > 0 {
		return Override
	}

	return path.Join(config.Config.Ruby.Dir, "git-hooks")
}