зеркало из https://github.com/go-gitea/git.git
Change const variable name
This commit is contained in:
Родитель
b3009dc4f5
Коммит
a6a203b182
4
hook.go
4
hook.go
|
@ -102,13 +102,13 @@ func ListHooks(repoPath string) (_ []*Hook, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
HOOK_PATH_UPDATE = "hooks/update"
|
HookPathUpdate = "hooks/update"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetUpdateHook writes given content to update hook of the reposiotry.
|
// SetUpdateHook writes given content to update hook of the reposiotry.
|
||||||
func SetUpdateHook(repoPath, content string) (err error) {
|
func SetUpdateHook(repoPath, content string) (err error) {
|
||||||
log("Setting update hook: %s", repoPath)
|
log("Setting update hook: %s", repoPath)
|
||||||
hookPath := path.Join(repoPath, HOOK_PATH_UPDATE)
|
hookPath := path.Join(repoPath, HookPathUpdate)
|
||||||
if com.IsExist(hookPath) {
|
if com.IsExist(hookPath) {
|
||||||
err = os.Remove(hookPath)
|
err = os.Remove(hookPath)
|
||||||
} else {
|
} else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче